diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2004-07-10 15:51:19 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2004-07-10 15:51:19 (GMT) |
commit | dfa74b97ec6e79571be4905bba5b5c9a32acc6ff (patch) | |
tree | d70458a71702f4c33f6f5d25449609f34b62f437 /Lib/asyncore.py | |
parent | 55430213c55b74a256e0b7e3f35234249b574a9b (diff) | |
download | cpython-dfa74b97ec6e79571be4905bba5b5c9a32acc6ff.zip cpython-dfa74b97ec6e79571be4905bba5b5c9a32acc6ff.tar.gz cpython-dfa74b97ec6e79571be4905bba5b5c9a32acc6ff.tar.bz2 |
Return value from .close(); move .set_file up
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r-- | Lib/asyncore.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py index 8d8d88f..9c36977 100644 --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -509,7 +509,7 @@ if os.name == 'posix': write = send def close(self): - return os.close(self.fd) + os.close(self.fd) def fileno(self): return self.fd @@ -519,11 +519,11 @@ if os.name == 'posix': def __init__(self, fd, map=None): dispatcher.__init__(self, None, map) self.connected = True + self.set_file(fd) # set it to non-blocking mode flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0) flags = flags | os.O_NONBLOCK fcntl.fcntl(fd, fcntl.F_SETFL, flags) - self.set_file(fd) def set_file(self, fd): self._fileno = fd |