Revision 2fd7f564
b/lib/utils.py | ||
---|---|---|
2519 | 2519 |
try: |
2520 | 2520 |
return fn(*args, **kwargs) |
2521 | 2521 |
except EnvironmentError, err: |
2522 |
if err.errno != errno.EINTR: |
|
2522 |
if err.errno == errno.EINTR: |
|
2523 |
return None |
|
2524 |
else: |
|
2523 | 2525 |
raise |
2524 | 2526 |
except (select.error, socket.error), err: |
2525 | 2527 |
# In python 2.6 and above select.error is an IOError, so it's handled |
2526 | 2528 |
# above, in 2.5 and below it's not, and it's handled here. |
2527 |
if not (err.args and err.args[0] == errno.EINTR): |
|
2529 |
if err.args and err.args[0] == errno.EINTR: |
|
2530 |
return None |
|
2531 |
else: |
|
2528 | 2532 |
raise |
2529 | 2533 |
|
2530 | 2534 |
|
Also available in: Unified diff