Commit 8706e6a1 authored by Fred Drake's avatar Fred Drake

- 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().
parent 7b5f82f2
......@@ -20,7 +20,6 @@ import errno
import random
import socket
import tempfile
import traceback
import zLOG
......@@ -72,7 +71,8 @@ def start_zeo_server(conf, addr=None, ro_svr=0, keep=0):
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:
......@@ -100,6 +100,14 @@ def start_zeo_server(conf, addr=None, ro_svr=0, keep=0):
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):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(adminaddr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment