Commit d19548b2 authored by Guido van Rossum's avatar Guido van Rossum

I don't see why self._closed should be None for false and 1 for

true.  Use 0 for false instead.
parent cdf437a8
...@@ -58,7 +58,7 @@ if os.name == 'posix': ...@@ -58,7 +58,7 @@ if os.name == 'posix':
asyncore.file_dispatcher.__init__(self, r) asyncore.file_dispatcher.__init__(self, r)
self.lock = thread.allocate_lock() self.lock = thread.allocate_lock()
self.thunks = [] self.thunks = []
self._closed = None self._closed = 0
# Override the asyncore close() method, because it seems that # Override the asyncore close() method, because it seems that
# it would only close the r file descriptor and not w. The # it would only close the r file descriptor and not w. The
...@@ -67,7 +67,7 @@ if os.name == 'posix': ...@@ -67,7 +67,7 @@ if os.name == 'posix':
# the default close. But that would leave w open... # the default close. But that would leave w open...
def close(self): def close(self):
if self._closed is None: if not self._closed:
self._closed = 1 self._closed = 1
self.del_channel() self.del_channel()
for fd in self._fds: for fd in self._fds:
......
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