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

Fix the control flow in pending(). Thanks to Ury Marshak!!!

Rather than blaming window for reporting success as an error, the
else clause on the second try block should be an except clause.
parent 5a4a9d6d
......@@ -400,9 +400,6 @@ class Connection(smac.SizedMessageAsyncConnection):
except select.error, err:
if err[0] == errno.EINTR:
continue
elif err[0] == 0:
# Windows sez: "Error: Success." :-)
break
else:
raise
if not r:
......@@ -411,7 +408,7 @@ class Connection(smac.SizedMessageAsyncConnection):
self.handle_read_event()
except asyncore.ExitNow:
raise
else:
except:
self.handle_error()
class ManagedServerConnection(Connection):
......
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