[Mailman-Users] problems with withlist and changepw.py

Richard Barrett r.barrett at openinfo.demon.co.uk
Wed Apr 16 22:16:08 CEST 2003


At 20:56 16/04/2003, Keith Nunn wrote:
>I'm using the changepw.py example from the withliost man page:

Use 'NotAMemberError' instead of 'NotAMember' in the text of the script

>from Mailman.Errors import NotAMember
>
>def changepw(mlist, addr, newpasswd):
>     try:
>         mlist.setMemberPassword(addr, newpasswd)
>         mlist.Save()
>     except NotAMember:
>         print 'No address matched:', addr
>
>partly as an exercise and partly so I can figure out a good way to
>integrate Mailman with my canoeing club software.  However, after
>following (I think) the instructions about using withlist and the above
>bit of code:
>
>bin/withlist -l -r changepw vvcc kapn at kapn.net passwd
>(executed in the mailman directory)
>
>I get the following error:
>
>Importing changepw...
>Traceback (most recent call last):
>   File "./bin/withlist", line 275, in ?
>     main()
>   File "./bin/withlist", line 247, in main
>     mod = __import__(module)
>   File "./bin/changepw.py", line 1, in ?
>     from Mailman.Errors import NotAMember
>ImportError: cannot import name NotAMember
>
>It looks like the sort of error easily solved by someone with a clue
>about Python, but not having much of a clue I'm a bit lost.  Why is the
>NotAMember method (or object, or whatever it is) not being loaded?  What
>do I need to do to get it coming in?  Any help would be appreciated
>
>kapn
>--
>Keith Nunn, Webmanager, Anglican Church of Canada
>knunn at national.anglican.ca * 416-924-9199 x340
>www.anglican.ca * www.anglicanjournal.com
>
>
>------------------------------------------------------
>Mailman-Users mailing list
>Mailman-Users at python.org
>http://mail.python.org/mailman/listinfo/mailman-users
>Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
>Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
>
>This message was sent to: r.barrett at openinfo.demon.co.uk
>Unsubscribe or change your options at
>http://mail.python.org/mailman/options/mailman-users/r.barrett%40openinfo.demon.co.uk 
>




More information about the Mailman-Users mailing list