Modify

Opened 8 years ago

Closed 8 weeks ago

#1301 closed defect (fixed)

[PATCH] Non-Trac Environment Folder Errors.

Reported by: prasand Owned by: rjollos
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 7 years ago.
Patch to solve that problem

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by anonymous

Patch to solve that problem

comment:1 Changed 5 years ago by AdrianFritz

  • Summary changed from Non-Trac Environment Folder Errors. to [PATCH] Non-Trac Environment Folder Errors.

comment:2 Changed 5 years ago by AdrianFritz

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

comment:3 Changed 8 weeks ago by rjollos

  • Owner changed from coderanger to rjollos
  • Status changed from new to assigned

comment:4 Changed 8 weeks ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

In 14053:

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.