Ticket #9616 (closed defect: fixed)

Opened 1 year ago

Last modified 6 months ago

AnnouncementSystem fails when set_message_id is false and ticket is changed

Reported by: julrich Assigned to: 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

set_message_id_fix.patch.txt (0.8 kB) - added by julrich on 12/15/11 15:47:08.

Change History

12/15/11 15:47:08 changed by julrich

  • attachment set_message_id_fix.patch.txt added.

12/15/11 15:49:32 changed by julrich

Added patch to fix the problem.

10/15/12 04:42:08 changed by rjollos

  • description changed.

10/15/12 04:44:43 changed by rjollos

#9617 closed as a duplicate.

11/12/12 14:53:52 changed by doki_pen

  • owner changed from doki_pen to hasienda.

11/12/12 23:51:10 changed by hasienda

  • keywords set to email header.
  • 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).

11/12/12 23:59:25 changed by hasienda

#8310 seems related.

11/13/12 00:18:08 changed by hasienda

  • status changed from new to closed.
  • resolution set to fixed.

(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.

11/13/12 00:19:19 changed by hasienda

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


Add/Change #9616 (AnnouncementSystem fails when set_message_id is false and ticket is changed)




Change Properties
Action