[Mailman-Developers] [ mailman-Bugs-666235 ] sync_members bugs (possible fixes included)

SourceForge.net noreply at sourceforge.net
Wed Jan 15 07:43:13 EST 2003


Bugs item #666235, was opened at 2003-01-11 10:31
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=666235&group_id=103

Category: command line scripts
Group: 2.1 (stable)
Status: Open
Resolution: None
>Priority: 7
Submitted By: Eric Ding (ericding)
Assigned to: Nobody/Anonymous (nobody)
Summary: sync_members bugs (possible fixes included)

Initial Comment:
While trying to run sync_members in MM 2.1, I get the
following errors:

Traceback (most recent call last):
  File "/home/mailman/bin/sync_members", line 286, in ?
    main()
  File "/home/mailman/bin/sync_members", line 258, in main
    s = email.Utils.formataddr((name,
addr)).encode(enc, replace')
UnboundLocalError: local variable 'enc' referenced
before assignment

I worked around this by adding

   enc = sys.getdefaultencoding()

at line 258.  But then the script throws an error while
trying to remove members!  Here's the traceback:

  File "/home/mailman/bin/sync_members", line 287, in ?
    main()
  File "/home/mailman/bin/sync_members", line 276, in main
    name = mlist.getMemberName(laddr) or ''
  File "/home/mailman/Mailman/OldStyleMemberships.py",
line 128, in getMemberName
    self.__assertIsMember(member)
  File "/home/mailman/Mailman/OldStyleMemberships.py",
line 113, in __assertIsMember
    raise Errors.NotAMemberError, member
Mailman.Errors.NotAMemberError: xxxxx at hotmail.com

If I change line 276 to just set name to '', then the
script completes successfully.  Is it possible it's
trying to reference member name after the member has
already been deleted from the list?

Eric

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

Comment By: Colin Palmer (tzs)
Date: 2003-01-12 17:01

Message:
Logged In: YES 
user_id=658762

Just ran into this one this morning too.  Moving the  call
to mlist.getMemberName(laddr) up to line 266 solved it for me.

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

Comment By: Eric Ding (ericding)
Date: 2003-01-11 10:36

Message:
Logged In: YES 
user_id=302756

While I think my fix was sufficient, I think a more elegant
one would be to move the offending line (i.e.,
mlist.getMemberName) further up in its clause, so that it's
called before the address is deleted from the list.

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

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



More information about the Mailman-Developers mailing list