Modify

Opened 4 years ago

Last modified 22 months ago

#8306 new defect

Fails when using StaticEmailDecorator and email_always_*

Reported by: robguttman Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: blocker Keywords: email duplicate
Cc: hasienda Trac Release: 0.12

Description

Traceback from log:

2010-12-14 10:16:19,918 Trac[email_decorators] DEBUG: StaticEmailDecorator added 'guttman@alum.mit.edu' because of rule: email_always_cc
2010-12-14 10:16:19,920 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/api.py", line 560, in _real_send
    evt)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/distributors/mail.py", line 367, in distribute
    self._do_send(transport, event, k, v, fmtdict[k], msg_pubkey_ids)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/distributors/mail.py", line 513, in _do_send
    decorator.decorate_message(event, rootMessage, decorators)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/email_decorators.py", line 237, in decorate_message
    return next_decorator(event, message, decorates)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/util/mail.py", line 48, in next_decorator
    return next.decorate_message(event, message, decorates)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/email_decorators.py", line 203, in decorate_message
    return next_decorator(event, message, decorates)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/util/mail.py", line 48, in next_decorator
    return next.decorate_message(event, message, decorates)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/email_decorators.py", line 186, in decorate_message
    return next_decorator(event, message, decorates)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/util/mail.py", line 48, in next_decorator
    return next.decorate_message(event, message, decorates)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/email_decorators.py", line 148, in decorate_message
    return next_decorator(event, message, decorators)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/util/mail.py", line 48, in next_decorator
    return next.decorate_message(event, message, decorates)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/email_decorators.py", line 123, in decorate_message
    recips = ", ".join(str(message[k]), v)
TypeError: join() takes exactly one argument (2 given)

Attachments (0)

Change History (4)

comment:1 Changed 4 years ago by robguttman

Changing line 123 (I added two debug lines so should really be 121 in original version from trunk) of email_decorators.py fixed it for me - from:

                    recips = ", ".join(str(message[k]), v)

to:

                    recips = ", ".join([str(message[k]), v])

However, the overall logic still seems wrong for this decorator - unless duplicate email addresses and prefixed spaces are presumed to be handled downstream?

comment:2 Changed 4 years ago by hasienda

  • Keywords email duplicate added

I'll get that fix out too, but check handling of email address duplicates later. Thanks for the hint, again.

comment:3 Changed 4 years ago by hasienda

(In [9675]) TracAnnouncer: Correct join argument from multiple args to list, refs #8306.

comment:4 Changed 22 months ago by doki_pen

  • Owner changed from doki_pen to hasienda

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.