Opened 18 years ago
Closed 18 years ago
#3623 closed defect (fixed)
Property in trac.ini assigned to nothing leads to python error
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | 0.10 |
Component: | general | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Was upgrading from 0.9.5 to 0.10dev. The [header_logo] section of trac.ini included a line:
height≤no value>
In 0.9.5 it was allowed. In 0.10dev it generates an integer conversion error.
Attachments (0)
Change History (3)
follow-up: 2 comment:1 by , 18 years ago
comment:2 by , 18 years ago
Replying to coderanger@yahoo.com:
IntOption and BoolOption should both probably catch ValueError, and raise a TracError with a more decriptive error.
A descriptive error when the setting is unparsable (i.e. "abc" → int) would be good, though if the setting is blank it should probably use None
as the value.
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The getint
method already catches ValueError
to provide a slightly better message.
In r3691 the method was fixed to return the default value if the option in the file is blank.
IntOption and BoolOption should both probably catch ValueError, and raise a TracError with a more decriptive error.