diff options
| author | bwarsaw | 2007-04-05 18:45:05 +0000 |
|---|---|---|
| committer | bwarsaw | 2007-04-05 18:45:05 +0000 |
| commit | 081e590fab0f512f7ddb4a7e5c3fdc60ca154cff (patch) | |
| tree | 39fbc3077610a7eae5c87d016b718ed26de99de0 /Mailman/bin/withlist.py | |
| parent | 43f516b5d72a3d20f13957cee7f9c8a6699120ad (diff) | |
| download | mailman-081e590fab0f512f7ddb4a7e5c3fdc60ca154cff.tar.gz mailman-081e590fab0f512f7ddb4a7e5c3fdc60ca154cff.tar.zst mailman-081e590fab0f512f7ddb4a7e5c3fdc60ca154cff.zip | |
Diffstat (limited to 'Mailman/bin/withlist.py')
| -rw-r--r-- | Mailman/bin/withlist.py | 5 |
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) |
