Menu

#498 bin/update fails on bogus import

2.1 beta
closed
nobody
5
2002-07-03
2002-06-21
No

Traceback (most recent call last):
File "bin/update", line 47, in ?
from Mailman import MailList
File "/var/lib/mailman/Mailman/MailList.py", line 40,
in ?
from email.Utils import getaddresses, formataddr,
parseaddr
ImportError: cannot import name formataddr
make: *** [update] Error 1

there is no function formataddr in
/usr/lib/python2.2/email/Utils.py

formataddr is called only within the code to generate
the admin_notif for new subscriptions.

My solution was

40c40
< from email.Utils import getaddresses, formataddr,
parseaddr
---
> from email.Utils import getaddresses, parseaddr
865c865
< "member" : formataddr((name, email)),
---
> "member" : "%s <%s>" % (name, email),

Discussion

  • Barry Warsaw

    Barry Warsaw - 2002-07-03

    Logged In: YES
    user_id=12800

    The next Mailman beta will fix this by installing it's own
    copy of the email package instead of trying to use the
    (incomplete) one from Python 2..2

     
  • Barry Warsaw

    Barry Warsaw - 2002-07-03
    • status: open --> closed
     

Log in to post a comment.