[Zope-Checkins] SVN: Zope/trunk/ bin/zopectl test now uses os.execv, instead os os.system, so that options with characters that needs shell quoting doesn't break the command.

Lennart Regebro regebro at nuxeo.com
Fri Nov 26 13:45:37 EST 2004


Log message for revision 28526:
  bin/zopectl test now uses os.execv, instead os os.system, so that options with characters that needs shell quoting doesn't break the command.
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Zope/Startup/zopectl.py

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt	2004-11-26 18:27:43 UTC (rev 28525)
+++ Zope/trunk/doc/CHANGES.txt	2004-11-26 18:45:37 UTC (rev 28526)
@@ -46,6 +46,10 @@
 
     Bugs fixed
     
+      - bin/zopectl test now uses os.execv, instead os os.system,
+        so that options with characters that needs shell quoting
+        doesn't break the command.
+      
       - Collector #945:  Allow adding empty PythonScript instances
         programmatically.
 

Modified: Zope/trunk/lib/python/Zope/Startup/zopectl.py
===================================================================
--- Zope/trunk/lib/python/Zope/Startup/zopectl.py	2004-11-26 18:27:43 UTC (rev 28525)
+++ Zope/trunk/lib/python/Zope/Startup/zopectl.py	2004-11-26 18:45:37 UTC (rev 28526)
@@ -254,10 +254,10 @@
             args.insert(0, '-v')
 
         args.insert(0, script)
+        args.insert(0, self.options.python)
 
-        cmdline = ' '.join([self.options.python] + args)
-        print 'Running tests via: %s' % cmdline
-        os.system(cmdline)
+        print 'Running tests via: %s' % ' '.join(args)
+        os.execv(self.options.python, args)
 
     def help_test(self):
         print "test [args]+ -- run unit / functional tests."



More information about the Zope-Checkins mailing list