Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8070 closed defect (fixed)

[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:

Description

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.

Attachments (1)

query.py.patch (502 bytes ) - added by John A. Barbuto <jbarbuto@…> 15 years ago.

Download all attachments as: .zip

Change History (5)

by John A. Barbuto <jbarbuto@…>, 15 years ago

Attachment: query.py.patch added

comment:1 by John A. Barbuto <jbarbuto@…>, 15 years ago

Cc: jbarbuto@… added

comment:2 by Remy Blank, 15 years ago

Milestone: 0.11.4
Owner: set to Remy Blank

Yes, good catch. Thanks!

comment:3 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

Patch applied in [7909].

comment:4 by Remy Blank, 15 years ago

Owner: changed from Remy Blank to jbarbuto@…

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain jbarbuto@….
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from jbarbuto@… 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.