Modify

Opened 6 years ago

Closed 6 months ago

Last modified 6 months ago

#8306 closed defect (fixed)

Fails when using StaticEmailDecorator and email_always_*

Reported by: Rob Guttman Owned by: Steffen Hoffmann
Priority: normal Component: AnnouncerPlugin
Severity: blocker Keywords: email duplicate
Cc: Steffen Hoffmann 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 (7)

comment:1 Changed 6 years ago by Rob Guttman

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 6 years ago by Steffen Hoffmann

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 6 years ago by Steffen Hoffmann

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

comment:4 Changed 5 years ago by Robert Corsaro

Owner: changed from Robert Corsaro to Steffen Hoffmann

comment:5 Changed 6 months ago by Ryan J Ollos

Owner: Steffen Hoffmann deleted

comment:6 Changed 6 months ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

comment:7 Changed 6 months ago by Ryan J Ollos

Owner: set to Steffen Hoffmann

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.