[Zodb-checkins] CVS: ZODB3/ZEO/zrpc - trigger.py:1.7

Guido van Rossum guido@python.org
Mon, 16 Sep 2002 12:58:46 -0400


Update of /cvs-repository/ZODB3/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv31253

Modified Files:
	trigger.py 
Log Message:
I don't see why self._closed should be None for false and 1 for
true.  Use 0 for false instead.


=== ZODB3/ZEO/zrpc/trigger.py 1.6 => 1.7 ===
--- ZODB3/ZEO/zrpc/trigger.py:1.6	Sun Sep 15 22:39:27 2002
+++ ZODB3/ZEO/zrpc/trigger.py	Mon Sep 16 12:58:46 2002
@@ -58,7 +58,7 @@
             asyncore.file_dispatcher.__init__(self, r)
             self.lock = thread.allocate_lock()
             self.thunks = []
-            self._closed = None
+            self._closed = 0
 
         # Override the asyncore close() method, because it seems that
         # it would only close the r file descriptor and not w.  The
@@ -67,7 +67,7 @@
         # the default close.  But that would leave w open...
 
         def close(self):
-            if self._closed is None:
+            if not self._closed:
                 self._closed = 1
                 self.del_channel()
                 for fd in self._fds: