[Mailman-Developers] [ mailman-Bugs-572312 ] bin/update fails on bogus import

noreply@sourceforge.net noreply@sourceforge.net
Wed, 03 Jul 2002 11:55:17 -0700


Bugs item #572312, was opened at 2002-06-21 17:34
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=572312&group_id=103

Category: configuring/installing
Group: 2.1 beta
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Larry A. Price (swirly)
Assigned to: Nobody/Anonymous (nobody)
Summary: bin/update fails on bogus import

Initial Comment:
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),


----------------------------------------------------------------------

>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-07-03 14:55

Message:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=572312&group_id=103