check so we cannot fail

This commit is contained in:
Nikos Kouremenos 2005-12-26 13:36:55 +00:00
parent 67aa6460de
commit 250e916318

View file

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