Commit c7c1f699 authored by Guido van Rossum's avatar Guido van Rossum

Fix the Windows version of the ro_svr code.

parent d99cf84b
...@@ -64,10 +64,10 @@ if os.name == "nt": ...@@ -64,10 +64,10 @@ if os.name == "nt":
if script.endswith('.pyc'): if script.endswith('.pyc'):
script = script[:-1] script = script[:-1]
if ro_svr: if ro_svr:
args = (sys.executable, script, "-r") prefix = (sys.executable, script, "-r")
else: else:
args = (sys.executable, script) prefix = (sys.executable, script)
args += (str(port), storage_name) + args args = prefix + (str(port), storage_name) + args
d = os.environ.copy() d = os.environ.copy()
d['PYTHONPATH'] = os.pathsep.join(sys.path) d['PYTHONPATH'] = os.pathsep.join(sys.path)
pid = os.spawnve(os.P_NOWAIT, sys.executable, args, d) pid = os.spawnve(os.P_NOWAIT, sys.executable, args, d)
......
...@@ -55,7 +55,7 @@ def main(args): ...@@ -55,7 +55,7 @@ def main(args):
if args[0] == "-r": if args[0] == "-r":
ro_svr = 1 ro_svr = 1
del args[0] del args[0]
port, storage_name, rawargs = args port, storage_name, rawargs = args[0], args[1], args[2:]
klass = load_storage_class(storage_name) klass = load_storage_class(storage_name)
args = [] args = []
for arg in rawargs: for arg in rawargs:
...@@ -66,7 +66,7 @@ def main(args): ...@@ -66,7 +66,7 @@ def main(args):
zeo_port = int(port) zeo_port = int(port)
test_port = zeo_port + 1 test_port = zeo_port + 1
t = ZEOTestServer(('', test_port), storage) t = ZEOTestServer(('', test_port), storage)
addr = [('', zeo_port)] addr = ('', zeo_port)
serv = ZEO.StorageServer.StorageServer(addr, {'1': storage}, ro_svr) serv = ZEO.StorageServer.StorageServer(addr, {'1': storage}, ro_svr)
import zLOG import zLOG
label = "winserver:%d" % os.getpid() label = "winserver:%d" % os.getpid()
......
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