check so we cannot fail

This commit is contained in:
Nikos Kouremenos 2005-12-26 13:36:55 +00:00
parent 67aa6460de
commit 250e916318
1 changed files with 4 additions and 2 deletions

View File

@ -44,9 +44,11 @@ def temp_failure_retry(func, *args, **kwargs):
return func(*args, **kwargs)
except (os.error, IOError, select.error), ex:
if hasattr(ex, 'errno'):
errnum = ex.errno
errnum = ex.errno
elif hasattr(ex, 'args') and len(ex.args) > 0:
errnum = ex.args[0]
else:
errnum = ex.args[0]
errnum = -1
if errnum == errno.EINTR:
continue
else: