[Zodb-checkins] CVS: ZEO/ZEO/tests - testStart.py:1.9

Jeremy Hylton jeremy@zope.com
Fri, 23 Aug 2002 10:31:44 -0400


Update of /cvs-repository/ZEO/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv16770

Modified Files:
	testStart.py 
Log Message:
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.


=== ZEO/ZEO/tests/testStart.py 1.8 => 1.9 ===
--- ZEO/ZEO/tests/testStart.py:1.8	Fri Aug 16 14:18:33 2002
+++ ZEO/ZEO/tests/testStart.py	Fri Aug 23 10:31:44 2002
@@ -154,16 +154,18 @@
         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