Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#1706 closed defect (fixed)

Environment.py hides configuration permission errors

Reported by: cmgreen@… Owned by: Matthew Good
Priority: normal Milestone: 0.9
Component: general Version: 0.8.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

If trac.ini is not accessable by the webserver, you get an error from core.py retrieving a config value of and then an index error on [-1].

{{

htdocs_location = env.get_config('trac', 'htdocs_location') if htdocs_location[-1] != '/':

htdocs_location += '/'

}}

ConfigParser.ConfigParser().read('file') hides access errors. The solution is to open the file manaully and then rely on readfp().

Attachments (1)

env.patch (506 bytes ) - added by cmgreen@… 19 years ago.
env.patch - Error when reading ini

Download all attachments as: .zip

Change History (3)

by cmgreen@…, 19 years ago

Attachment: env.patch added

env.patch - Error when reading ini

comment:1 by Matthew Good, 19 years ago

Owner: changed from Jonas Borgström to Matthew Good
Status: newassigned

comment:2 by Matthew Good, 19 years ago

Milestone: 0.9
Resolution: fixed
Status: assignedclosed

Fixed in [1849].

Thanks Chris.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Matthew Good to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.