Modify

Opened 18 years ago

Closed 10 years ago

#1301 closed defect (fixed)

[PATCH] Non-Trac Environment Folder Errors.

Reported by: Prasand J. Owned by: Ryan J Ollos
Priority: normal Component: ProjectMenuPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

When the project menu is loading, if there is a folder that is not a trac environment the folder isn't skipped / omitted and it produces an error (because the VERSION file cannot be found, and it seems to be trying to create a menu item for every folder). Here's the output:

Traceback (most recent call last):
  File "/home/user/packages/lib/python2.3/site-packages/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/home/user/packages/lib/python2.3/site-packages/trac/web/main.py", line 208, in dispatch
    chrome.populate_hdf(req, chosen_handler)
  File "/home/user/packages/lib/python2.3/site-packages/trac/web/chrome.py", line 319, in populate_hdf
    for category, name, text in contributor.get_navigation_items(req):
  File "build/bdist.linux-i686/egg/projectmenu/web_ui.py", line 21, in get_navigation_items
  File "/home/user/packages/lib/python2.3/site-packages/trac/web/main.py", line 58, in _open_environment
    env_cache[env_path] = open_environment(env_path)
  File "/home/user/packages/lib/python2.3/site-packages/trac/env.py", line 434, in open_environment
    env = Environment(env_path)
  File "/home/user/packages/lib/python2.3/site-packages/trac/env.py", line 126, in __init__
    self.verify()
  File "/home/user/packages/lib/python2.3/site-packages/trac/env.py", line 174, in verify
    fd = open(os.path.join(self.path, 'VERSION'), 'r')
IOError: [Errno 2] No such file or directory: '/home/user/trac/emptyfolder/VERSION'

Attachments (1)

ble (428 bytes) - added by anonymous 18 years ago.
Patch to solve that problem

Download all attachments as: .zip

Change History (5)

Changed 18 years ago by anonymous

Attachment: ble added

Patch to solve that problem

comment:1 Changed 15 years ago by Adrian Fritz

Summary: Non-Trac Environment Folder Errors.[PATCH] Non-Trac Environment Folder Errors.

comment:2 Changed 15 years ago by Adrian Fritz

See also PATCH in #1372, to decide which is better to apply.

comment:3 Changed 10 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Ryan J Ollos
Status: newassigned

comment:4 Changed 10 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

In 14053:

2.0dev: Skip directories that aren't Trac environments. Fixes #1301, Refs #1372.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.