Revision 965d0e5b lib/utils.py
b/lib/utils.py | ||
---|---|---|
566 | 566 |
while True: |
567 | 567 |
try: |
568 | 568 |
return fn(*args, **kwargs) |
569 |
except (EnvironmentError, socket.error), err:
|
|
569 |
except EnvironmentError, err:
|
|
570 | 570 |
if err.errno != errno.EINTR: |
571 | 571 |
raise |
572 |
except select.error, err: |
|
572 |
except (socket.error, select.error), err: |
|
573 |
# In python 2.6 and above select.error is an IOError, so it's handled |
|
574 |
# above, in 2.5 and below it's not, and it's handled here. |
|
573 | 575 |
if not (err.args and err.args[0] == errno.EINTR): |
574 | 576 |
raise |
575 | 577 |
|
... | ... | |
3001 | 3003 |
""" |
3002 | 3004 |
try: |
3003 | 3005 |
return fn(*args, **kwargs) |
3004 |
except (EnvironmentError, socket.error), err:
|
|
3006 |
except EnvironmentError, err:
|
|
3005 | 3007 |
if err.errno != errno.EINTR: |
3006 | 3008 |
raise |
3007 |
except select.error, err: |
|
3009 |
except (select.error, socket.error), err: |
|
3010 |
# In python 2.6 and above select.error is an IOError, so it's handled |
|
3011 |
# above, in 2.5 and below it's not, and it's handled here. |
|
3008 | 3012 |
if not (err.args and err.args[0] == errno.EINTR): |
3009 | 3013 |
raise |
3010 | 3014 |
|
Also available in: Unified diff