diff options
| author | bwarsaw | 2002-02-23 06:34:14 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-02-23 06:34:14 +0000 |
| commit | ab462479e5ebc0d668ab7ad2cc5ccff52a749787 (patch) | |
| tree | 7a3312e31697926d4067b341c00d297024112fdb /bin | |
| parent | eaa5afcb526edc39c612fa1ee8d7bf5e0b09c3d8 (diff) | |
| download | mailman-ab462479e5ebc0d668ab7ad2cc5ccff52a749787.tar.gz mailman-ab462479e5ebc0d668ab7ad2cc5ccff52a749787.tar.zst mailman-ab462479e5ebc0d668ab7ad2cc5ccff52a749787.zip | |
Update imports for the new rules on shadowing standard library
modules. Specifically, import the email package /after/ we've
imported paths.
Also, in add_members: change the import of StringIO to use the Python
standard cStringIO module, which we can now pretty much guarantee to
be there.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/add_members | 5 | ||||
| -rw-r--r-- | bin/dumpdb | 9 | ||||
| -rwxr-xr-x | bin/sync_members | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/bin/add_members b/bin/add_members index ee5c23dbd..3122febfe 100755 --- a/bin/add_members +++ b/bin/add_members @@ -71,16 +71,17 @@ files can be `-'. import sys import os import getopt +from cStringIO import StringIO +import paths +# Import this /after/ paths so that the sys.path is properly hacked from email.Utils import parseaddr -import paths from Mailman import MailList from Mailman import Utils from Mailman import Message from Mailman import Errors from Mailman import mm_cfg -from Mailman.pythonlib.StringIO import StringIO from Mailman import i18n _ = i18n._ diff --git a/bin/dumpdb b/bin/dumpdb index 577d94876..3f9345068 100644 --- a/bin/dumpdb +++ b/bin/dumpdb @@ -36,7 +36,7 @@ Options: If the filename ends with `.db', then it is assumed that the file contains a Python marshal. If the file ends with `.pck' then it is assumed to contain a Python pickle. In either case, if you want to override the default assumption -\(or if the file ends in neither suffix), use the -p or -m flags. +-- or if the file ends in neither suffix -- use the -p or -m flags. """ import sys @@ -45,14 +45,13 @@ import getopt import pprint import cPickle -# BAW: Import order dependency! paths must be imported before anything from -# the email package. import paths +# Import this /after/ paths so that the sys.path is properly hacked +from email.Generator import Generator + from Mailman.Queue.Switchboard import DumperSwitchboard from Mailman.i18n import _ -from email.Generator import Generator - PROGRAM = sys.argv[0] COMMASPACE = ', ' diff --git a/bin/sync_members b/bin/sync_members index fa7410ee1..0e27c8e6a 100755 --- a/bin/sync_members +++ b/bin/sync_members @@ -70,9 +70,11 @@ Where `options' are: """ import sys -import email.Utils import paths +# Import this /after/ paths so that the sys.path is properly hacked +import email.Utils + from Mailman import MailList from Mailman import Errors from Mailman import Utils |
