[Mailman-Users] Re: checkdbs error in 2.1b4

Links at Momsview links at momsview.com
Wed Nov 13 06:05:22 CET 2002


I believe I have found a bug in the 2.1b4 checkdbs module in 
mailman/pythonlibs/email/

Original section of code
------------------
import sys
import time
from types import UnicodeType
from email.Charset import Charset

import paths
# mm_cfg must be imported before the other modules, due to the side-effect of
# it hacking sys.paths to include site-packages.  Without this, running this
# script from cron with python -S will fail.
from Mailman import mm_cfg
from Mailman import Utils
from Mailman import MailList
from Mailman import Message
from Mailman import i18n
-------------------------------------------------
Notice the "from email.Charset import Charset"  before the "import paths"

Moving the "from email.Charset ..."  after the "import paths" eliminated the error

The code section now reads as follows:
-----------------------------------------------
import sys
import time
from types import UnicodeType

import paths
from email.Charset import Charset
# mm_cfg must be imported before the other modules, due to the side-effect of
# it hacking sys.paths to include site-packages.  Without this, running this
# script from cron with python -S will fail.
from Mailman import mm_cfg
from Mailman import Utils
from Mailman import MailList
from Mailman import Message
from Mailman import i18n
-----------------------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/mailman-users/attachments/20021113/c1c219e9/attachment.htm 


More information about the Mailman-Users mailing list