Modify ↓
Opened 20 years ago
Closed 20 years ago
#1706 closed defect (fixed)
Environment.py hides configuration permission errors
| Reported by: | 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)
Change History (3)
by , 20 years ago
comment:1 by , 20 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 20 years ago
| Milestone: | → 0.9 |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Fixed in [1849].
Thanks Chris.
Note:
See TracTickets
for help on using tickets.



env.patch - Error when reading ini