Modify

Opened 3 years ago

Closed 23 months ago

Last modified 23 months ago

#9616 closed defect (fixed)

AnnouncementSystem fails when set_message_id is false and ticket is changed

Reported by: julrich Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: minor Keywords: email header
Cc: julrich Trac Release: 0.11

Description (last modified by rjollos)

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 julrich 3 years ago.

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by julrich

comment:1 Changed 3 years ago by julrich

Added patch to fix the problem.

comment:2 Changed 2 years ago by rjollos

  • Description modified (diff)

comment:3 Changed 2 years ago by rjollos

#9617 closed as a duplicate.

comment:4 Changed 23 months ago by doki_pen

  • Owner changed from doki_pen to hasienda

comment:5 Changed 23 months ago by hasienda

  • Keywords email header added
  • Trac Release changed from 0.12 to 0.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 23 months ago by hasienda

#8310 seems related.

comment:7 Changed 23 months ago by hasienda

  • Resolution set to fixed
  • Status changed from new to closed

(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 23 months ago by hasienda

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.