Modify ↓
Opened 14 years ago
Closed 14 years ago
#10078 closed defect (fixed)
Improper use of property() in env.py
Reported by: | anonymous | Owned by: | Remy Blank |
---|---|---|---|
Priority: | high | Milestone: | 0.12.3 |
Component: | general | Version: | |
Severity: | minor | Keywords: | |
Cc: | joshua@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
This code:
from trac.web.href import Href from trac.env import open_environment env = open_environment('/path/to/trac') env.href = Href(u'https://example.com/trac/')
Creates this traceback:
Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'str' object is not callable
This is because of this line at http://trac.edgewall.org/browser//trunk/trac/env.py#L665
href = property(_get_href, 'The application root path')
The docs at http://docs.python.org/library/functions.html#property state that the doc string should be the fourth parameter, not the second parameter.
Same error on line 676 as well. All usages of property() should probably be checked.
Attachments (0)
Change History (2)
comment:1 by , 14 years ago
Milestone: | → 0.12.3 |
---|---|
Owner: | set to |
Severity: | normal → minor |
Note:
See TracTickets
for help on using tickets.
Yes, that's plain wrong. Thanks for the heads-up.