diff options
author | bwarsaw <> | 2007-04-05 18:37:08 +0000 |
---|---|---|
committer | bwarsaw <> | 2007-04-05 18:37:08 +0000 |
commit | ac3ea676aa380d2b2214f272ddafdadb19ab2a4d (patch) | |
tree | 18ea214d369c654088a1a7218c55eb6e52746f42 /bin | |
parent | a3dc31d77628d839c1c1d2d0ea09b110495df8d8 (diff) | |
download | mailman2-ac3ea676aa380d2b2214f272ddafdadb19ab2a4d.tar.gz mailman2-ac3ea676aa380d2b2214f272ddafdadb19ab2a4d.tar.xz mailman2-ac3ea676aa380d2b2214f272ddafdadb19ab2a4d.zip |
Fix a very old bug in withlist which prevented -r from working with package
paths more deeply nested than 1 level. IOW, -r package.package.module.func
now works as intended.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/withlist | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/withlist b/bin/withlist index ac0967b9..38ab9abb 100644 --- a/bin/withlist +++ b/bin/withlist @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998-2004 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """General framework for interacting with a mailing list object. @@ -254,7 +255,7 @@ def main(): # try to import the module for the callable func = None if run: - i = run.find('.') + i = run.rfind('.') if i < 0: module = run callable = run @@ -263,7 +264,8 @@ def main(): callable = run[i+1:] if VERBOSE: print >> sys.stderr, _('Importing %(module)s...') - mod = __import__(module) + __import__(module) + mod = sys.modules[module] if VERBOSE: print >> sys.stderr, _('Running %(module)s.%(callable)s()...') func = getattr(mod, callable) |