Commit 7b10d320 authored by Jeremy Hylton's avatar Jeremy Hylton

Fix testLogRestart().

Use STUPID_LOG_FILE instead of EVENT_LOG_FILE so that it works with
older Zopes.

Make sure buf1 is defined even if open() never succeeds.
parent ad343515
......@@ -154,16 +154,18 @@ class StartTests(unittest.TestCase):
port = 9090
logfile1 = tempfile.mktemp(suffix="log")
logfile2 = tempfile.mktemp(suffix="log")
os.environ["EVENT_LOG_FILE"] = logfile1
os.environ["STUPID_LOG_FILE"] = logfile1
try:
outp = self.fork("-s", "-p", str(port))
self.connect(port=port)
buf1 = None
for i in range(10):
try:
buf1 = open(logfile1).read()
except IOError, e:
if e.errno != errno.ENOENT: raise
if e.errno != errno.ENOENT:
raise
time.sleep(1)
else:
break
......
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