[PATCH] "ValueError: invalid literal for int()" when running custom query
Reported by: |
John A. Barbuto <jbarbuto@…> |
Owned by: |
jbarbuto@… |
Priority:
|
normal
|
Milestone:
|
0.11.4
|
Component:
|
ticket system
|
Version:
|
0.11-stable
|
Severity:
|
normal
|
Keywords:
|
|
Cc:
|
jbarbuto@…
|
Branch:
|
|
Release Notes:
|
|
API Changes:
|
|
Internal Changes:
|
|
We were getting an internal error on custom queries:
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/web/main.py", line 432, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/web/main.py", line 204, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/ticket/query.py", line 823, in process_request
return self.display_html(req, query)
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/ticket/query.py", line 876, in display_html
tickets = query.execute(req, db)
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/ticket/query.py", line 306, in execute
val = bool(int(val))
The ValueError exception is missed since multiple exceptions in an except clause need to be contained in a tuple. The attached patch against 0.11-stable fixes the problem.
Change History
(5)
Milestone: |
→ 0.11.4
|
Owner: |
set to Remy Blank
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Owner: |
changed from Remy Blank to jbarbuto@…
|
Yes, good catch. Thanks!