[Zope-Checkins] CVS: Zope/lib/python/ZEO/tests - forker.py:1.29
Fred L. Drake, Jr.
fred@zope.com
Tue, 17 Dec 2002 13:34:12 -0500
Update of /cvs-repository/Zope/lib/python/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv31264
Modified Files:
forker.py
Log Message:
- Remove unused import (traceback module)
- start_zeo_server(): Only quote the command line args for Windows;
these break the tests on Linux, which would only need the quoting if
the shell were involved: it's not for os.spawnve().
=== Zope/lib/python/ZEO/tests/forker.py 1.28 => 1.29 ===
--- Zope/lib/python/ZEO/tests/forker.py:1.28 Tue Dec 17 09:30:07 2002
+++ Zope/lib/python/ZEO/tests/forker.py Tue Dec 17 13:34:11 2002
@@ -20,7 +20,6 @@
import random
import socket
import tempfile
-import traceback
import zLOG
@@ -72,7 +71,8 @@
if script.endswith('.pyc'):
script = script[:-1]
# Create a list of arguments, which we'll tuplify below
- args = ['"%s"' % sys.executable, '"%s"' % script, '-C', '"%s"' % tmpfile]
+ qa = _quote_arg
+ args = [qa(sys.executable), qa(script), '-C', qa(tmpfile)]
if ro_svr:
args.append('-r')
if keep:
@@ -98,6 +98,14 @@
zLOG.LOG('forker', zLOG.DEBUG, 'boo hoo')
raise
return ('localhost', port), adminaddr, pid
+
+
+if sys.platform[:3].lower() == "win":
+ def _quote_arg(s):
+ return '"%s"' % s
+else:
+ def _quote_arg(s):
+ return s
def shutdown_zeo_server(adminaddr):