Revision: 8188
          http://svn.sourceforge.net/mailman/?rev=8188&view=rev
Author:   bwarsaw
Date:     2007-04-05 11:45:05 -0700 (Thu, 05 Apr 2007)

Log Message:
-----------
r8187 from 2.1-maint branch; fix bin/withlist -r to work with package paths
more deeply nested than 1 level.

Modified Paths:
--------------
    trunk/mailman/Mailman/bin/withlist.py

Modified: trunk/mailman/Mailman/bin/withlist.py
===================================================================
--- trunk/mailman/Mailman/bin/withlist.py       2007-04-05 18:37:08 UTC (rev 
8187)
+++ trunk/mailman/Mailman/bin/withlist.py       2007-04-05 18:45:05 UTC (rev 
8188)
@@ -218,7 +218,7 @@
     # 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 @@
             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)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to