This commit is contained in:
Kovid Goyal 2012-06-27 13:44:06 +05:30
parent 9b9799f5b1
commit 8476de6507

View File

@ -17,8 +17,8 @@ def eintr_retry_call(func, *args, **kwargs):
while True: while True:
try: try:
return func(*args, **kwargs) return func(*args, **kwargs)
except (OSError, IOError) as e: except EnvironmentError as e:
if e.errno == errno.EINTR: if getattr(e, 'errno', None) == errno.EINTR:
continue continue
raise raise