catch correct exception when interrupt system call
This commit is contained in:
parent
4fdd42e3e4
commit
993c09ec70
|
@ -138,7 +138,7 @@ def temp_failure_retry(func, *args, **kwargs):
|
|||
while True:
|
||||
try:
|
||||
return func(*args, **kwargs)
|
||||
except (os.error, IOError, socket.error), ex:
|
||||
except (os.error, IOError, select.error), ex:
|
||||
if ex.errno == errno.EINTR:
|
||||
continue
|
||||
else:
|
||||
|
|
|
@ -42,7 +42,7 @@ def temp_failure_retry(func, *args, **kwargs):
|
|||
while True:
|
||||
try:
|
||||
return func(*args, **kwargs)
|
||||
except (os.error, IOError, socket.error), ex:
|
||||
except (os.error, IOError, select.error), ex:
|
||||
if ex.errno == errno.EINTR:
|
||||
continue
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue