[Zodb-checkins] CVS: StandaloneZODB/ZEO/tests - forker.py:1.1.2.8

Jeremy Hylton jeremy@zope.com
Tue, 8 Jan 2002 10:55:49 -0500


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

Modified Files:
      Tag: ZEO-ZRPC-Dev
	forker.py 
Log Message:
Don't import hotshot unless profiling is enabled.

This allows the code to work with Py ver < 2.2.


=== StandaloneZODB/ZEO/tests/forker.py 1.1.2.7 => 1.1.2.8 ===
 import asyncore
 import os
-import hotshot
 import random
 import socket
 import sys
@@ -19,7 +18,10 @@
 import types
 import ZEO.ClientStorage, ZEO.StorageServer
 
+# Change value of PROFILE to enable server-side profiling
 PROFILE = 0
+if PROFILE:
+    import hotshot
 
 def get_port():
     """Return a port that is not in use.