[Zodb-checkins] CVS: ZODB3/ZEO/zrpc - smac.py:1.27
Guido van Rossum
guido@python.org
Mon, 16 Sep 2002 12:57:11 -0400
Update of /cvs-repository/ZODB3/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv31125
Modified Files:
smac.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/smac.py 1.26 => 1.27 ===
--- ZODB3/ZEO/zrpc/smac.py:1.26 Sat Sep 7 19:50:51 2002
+++ ZODB3/ZEO/zrpc/smac.py Mon Sep 16 12:57:11 2002
@@ -66,7 +66,7 @@
self.__input_len = 0
self.__msg_size = 4
self.__output = []
- self.__closed = None
+ self.__closed = 0
self.__super_init(sock, map)
# XXX avoid expensive getattr calls? Can't remember exactly what
@@ -181,7 +181,7 @@
m = message
LOG(self._debug, TRACE, 'message_output %s' % `m`)
- if self.__closed is not None:
+ if self.__closed:
raise Disconnected, (
"This action is temporarily unavailable."
"<p>"
@@ -195,6 +195,6 @@
self.__output.append(message[i:i+SEND_SIZE])
def close(self):
- if self.__closed is None:
+ if not self.__closed:
self.__closed = 1
self.__super_close()