Edgewall Software
Modify

Opened 5 years ago

Closed 5 years ago

#12340 closed defect (fixed)

UnboundLocalError: local variable 'template' referenced before assignment

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.10
Component: report system Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

POST request with invalid action raises HTTPBadRequest for AttachmentModule, MilestoneModule, ReportModule and WikiModule.

API Changes:
Internal Changes:

Description

Found in the logs:

2016-01-29 04:29:19,755 Trac[main] ERROR: Internal Server Error: <RequestWithSession "POST '/report/1'">, referrer NoneTraceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/trac/web/main.py", line 554, in _dispatch_request
    dispatcher.dispatch(req)
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/trac/web/main.py", line 247, in dispatch
    resp = chosen_handler.process_request(req)
  File "/srv/trac-hacks.org/pve/lib/python2.7/site-packages/trac/ticket/report.py", line 209, in process_request
    return template, data, None
UnboundLocalError: local variable 'template' referenced before assignment

Attachments (0)

Change History (5)

comment:1 by Ryan J Ollos, 5 years ago

Owner: set to Ryan J Ollos
Status: newassigned

in reply to:  2 ; comment:3 by Jun Omae, 5 years ago

Replying to Ryan J Ollos:

Proposed changes in log:rjollos.git:t12340_template_referenced_before_assignment.

We already have "Invalid request arguments." message. It might be good to use "Invalid request arguments." rather than "Invalid %(method)s request." as a new message.

in reply to:  3 comment:4 by Ryan J Ollos, 5 years ago

Replying to Jun Omae:

We already have "Invalid request arguments." message. It might be good to use "Invalid request arguments." rather than "Invalid %(method)s request." as a new message.

Thanks for reviewing. I'll make that change before committing.

comment:5 by Ryan J Ollos, 5 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in [14520], merged to trunk in [14521].

Modify Ticket

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