homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author klimkin
Recipients
Date 2004年07月02日.13:56:12
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=410460
Perhaps, it would be better to raise exception:
def readwrite(obj, flags):
 try:
 if flags & (select.POLLIN | select.POLLPRI):
 obj.handle_read_event()
 if flags & select.POLLOUT:
 obj.handle_write_event()
 if flags & (select.POLLERR | select.POLLHUP |
select.POLLNVAL):
 obj.handle_expt_event()
 except ExitNow:
 raise
 except:
 obj.handle_error()
...
 def handle_expt_event(self):
 err = self.socket.getsockopt(socket.SOL_SOCKET,
socket.SO_ERROR)
 assert(err != 0)
 raise socket.error, (err, errorcode[err])
Since asyncore closes socket in handle_error, this solves
the problem too.
History
Date User Action Args
2007年08月23日 14:21:36adminlinkissue953599 messages
2007年08月23日 14:21:36admincreate

AltStyle によって変換されたページ (->オリジナル) /