summaryrefslogtreecommitdiff
path: root/Mailman/bin/withlist.py
diff options
context:
space:
mode:
authorbwarsaw2007-04-05 18:45:05 +0000
committerbwarsaw2007-04-05 18:45:05 +0000
commit081e590fab0f512f7ddb4a7e5c3fdc60ca154cff (patch)
tree39fbc3077610a7eae5c87d016b718ed26de99de0 /Mailman/bin/withlist.py
parent43f516b5d72a3d20f13957cee7f9c8a6699120ad (diff)
downloadmailman-081e590fab0f512f7ddb4a7e5c3fdc60ca154cff.tar.gz
mailman-081e590fab0f512f7ddb4a7e5c3fdc60ca154cff.tar.zst
mailman-081e590fab0f512f7ddb4a7e5c3fdc60ca154cff.zip
Diffstat (limited to 'Mailman/bin/withlist.py')
-rw-r--r--Mailman/bin/withlist.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mailman/bin/withlist.py b/Mailman/bin/withlist.py
index a305c5ce0..b108e4a18 100644
--- a/Mailman/bin/withlist.py
+++ b/Mailman/bin/withlist.py
@@ -218,7 +218,7 @@ def main():
# Try to import the module for the callable
func = None
if opts.run:
- i = opts.run.find('.')
+ i = opts.run.rfind('.')
if i < 0:
module = opts.run
callable = opts.run
@@ -227,7 +227,8 @@ def main():
callable = opts.run[i+1:]
if VERBOSE:
print >> sys.stderr, _('Importing $module ...')
- mod = __import__(module)
+ __import__(module)
+ mod = sys.modules[module]
if VERBOSE:
print >> sys.stderr, _('Running ${module}.${callable}() ...')
func = getattr(mod, callable)