Commit 2fd7f564 authored by Guido Trotter's avatar Guido Trotter
Browse files

Explicitely return None from IgnoreSignals



Same result, but what happens is clearer.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 6e7e58b4
......@@ -2519,12 +2519,16 @@ def IgnoreSignals(fn, *args, **kwargs):
try:
return fn(*args, **kwargs)
except EnvironmentError, err:
if err.errno != errno.EINTR:
if err.errno == errno.EINTR:
return None
else:
raise
except (select.error, socket.error), err:
# In python 2.6 and above select.error is an IOError, so it's handled
# above, in 2.5 and below it's not, and it's handled here.
if not (err.args and err.args[0] == errno.EINTR):
if err.args and err.args[0] == errno.EINTR:
return None
else:
raise
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment