Commit 3966716a authored by Denis Bilenko's avatar Denis Bilenko

socket: do not lose traceback in recvfrom()

parent 1d8a7e59
......@@ -339,9 +339,9 @@ class socket(object):
try:
return self._sock.recvfrom(*args)
except error, ex:
sys.exc_clear()
if ex[0] != EWOULDBLOCK or self.timeout == 0.0:
raise ex
raise
sys.exc_clear()
wait_read(self._sock.fileno(), timeout=self.timeout)
def recvfrom_into(self, *args):
......
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