[Zope-Checkins] SVN: Zope/branches/regebro-zopectl_shellfix/ 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 12:55:05 EST 2004


Log message for revision 28523:
  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/branches/regebro-zopectl_shellfix/doc/CHANGES.txt
  U   Zope/branches/regebro-zopectl_shellfix/lib/python/Zope/Startup/zopectl.py

-=-
Modified: Zope/branches/regebro-zopectl_shellfix/doc/CHANGES.txt
===================================================================
--- Zope/branches/regebro-zopectl_shellfix/doc/CHANGES.txt	2004-11-26 17:49:44 UTC (rev 28522)
+++ Zope/branches/regebro-zopectl_shellfix/doc/CHANGES.txt	2004-11-26 17:55:05 UTC (rev 28523)
@@ -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 #1599: made sqltest work with unicode strings (thanks
         to Peter Sabaini for the patch).
 

Modified: Zope/branches/regebro-zopectl_shellfix/lib/python/Zope/Startup/zopectl.py
===================================================================
--- Zope/branches/regebro-zopectl_shellfix/lib/python/Zope/Startup/zopectl.py	2004-11-26 17:49:44 UTC (rev 28522)
+++ Zope/branches/regebro-zopectl_shellfix/lib/python/Zope/Startup/zopectl.py	2004-11-26 17:55:05 UTC (rev 28523)
@@ -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