Modify

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#9616 closed defect (fixed)

AnnouncementSystem fails when set_message_id is false and ticket is changed

Reported by: Jochen Ulrich Owned by: Steffen Hoffmann
Priority: normal Component: AnnouncerPlugin
Severity: minor Keywords: email header
Cc: Jochen Ulrich Trac Release: 0.11

Description (last modified by Ryan J Ollos)

The AnnouncementSystem fails when the set_message_id option is set to false. More precisely, an email is sent for the creation of a ticket but not when the ticket is changed.

Here is the Traceback:

2011-12-15 13:52:28,528 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/api.py", line 369, in _real_send
    distributor.distribute(transport, packages[transport], evt)
  File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/distributors/email_distributor.py", line 238, in distribute
    self._do_send(transport, event, k, v, fmtdict[k])
  File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/distributors/email_distributor.py", line 341, in _do_send
    rootMessage['In-Reply-To'] = msgid
UnboundLocalError: local variable 'msgid' referenced before assignment
2011-12-15 13:52:28,528 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/api.py", line 369, in _real_send
    distributor.distribute(transport, packages[transport], evt)
  File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/distributors/email_distributor.py", line 238, in distribute
    self._do_send(transport, event, k, v, fmtdict[k])
  File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/distributors/email_distributor.py", line 341, in _do_send
    rootMessage['In-Reply-To'] = msgid
UnboundLocalError: local variable 'msgid' referenced before assignment

Attachments (1)

set_message_id_fix.patch.txt (829 bytes) - added by Jochen Ulrich 13 years ago.

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by Jochen Ulrich

comment:1 Changed 13 years ago by Jochen Ulrich

Added patch to fix the problem.

comment:2 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 12 years ago by Ryan J Ollos

#9617 closed as a duplicate.

comment:4 Changed 12 years ago by Robert Corsaro

Owner: changed from Robert Corsaro to Steffen Hoffmann

comment:5 Changed 12 years ago by Steffen Hoffmann

Keywords: email header added
Trac Release: 0.120.11

Relevant code has been reworked on it's way to trunk, and the Option has been removed.

So now this is dedicated to an depreciated code, that will get replaced after back-porting db access code from current mix of 0.11 and 0.12 API to 0.11 alone.

Still thanks for the report, I'll consider a hot-fix for the current branch, but strongly discourage to use that ancient code anymore (db schema revision v2 - before current subscriber schema).

comment:6 Changed 12 years ago by Steffen Hoffmann

#8310 seems related.

comment:7 Changed 12 years ago by Steffen Hoffmann

Resolution: fixed
Status: newclosed

(In [12343]) TracAnnouncer: Fix UnboundLocalError for variable 'msgid', closes #9616.

Thanks to julrich for report, investigation and the patch suggestion itself.

Futhermore let's start to track fixes in historic versions in changelog too.

comment:8 Changed 12 years ago by Steffen Hoffmann

Closed this due to my policy to only let tickets against current code open until next stable release.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.