summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-23 21:49:42 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-23 21:49:42 (GMT)
commit24d659daafd0e6c1514ee912f06f7b7310545e09 (patch)
treedfde423cd56334b8e85e8778b491f928d6a2c20b /Lib/multiprocessing
parentdcbb822c08e75dbb45afe1c435af95961f22387a (diff)
downloadcpython-24d659daafd0e6c1514ee912f06f7b7310545e09.zip
cpython-24d659daafd0e6c1514ee912f06f7b7310545e09.tar.gz
cpython-24d659daafd0e6c1514ee912f06f7b7310545e09.tar.bz2
Use InterruptedError instead of checking for EINTR
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/util.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/multiprocessing/util.py b/Lib/multiprocessing/util.py
index c487180..5c26683 100644
--- a/Lib/multiprocessing/util.py
+++ b/Lib/multiprocessing/util.py
@@ -327,15 +327,12 @@ class ForkAwareLocal(threading.local):
# Automatic retry after EINTR
#
-def _eintr_retry(func, _errors=(EnvironmentError, select.error)):
+def _eintr_retry(func):
@functools.wraps(func)
def wrapped(*args, **kwargs):
while True:
try:
return func(*args, **kwargs)
- except _errors as e:
- # select.error has no `errno` attribute
- if e.args[0] == errno.EINTR:
- continue
- raise
+ except InterruptedError:
+ continue
return wrapped