summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2014-07-25 17:45:02 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2014-07-25 17:45:02 (GMT)
commite396c363cbacce68d7750a7963af4d7cd3bf30e7 (patch)
tree40f9f102e9d7908e6bf4349128d42419e8735fec /Lib/asyncio/unix_events.py
parent65708cf510277492660420efa13bd2de163cd21b (diff)
parent2955a0bf06807d4e00ad053a7e2acb516939859e (diff)
downloadcpython-e396c363cbacce68d7750a7963af4d7cd3bf30e7.zip
cpython-e396c363cbacce68d7750a7963af4d7cd3bf30e7.tar.gz
cpython-e396c363cbacce68d7750a7963af4d7cd3bf30e7.tar.bz2
Merge.
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 73a85c1..5020cc5 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -74,7 +74,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
# event loop running in another thread cannot add a signal
# handler.
signal.set_wakeup_fd(self._csock.fileno())
- except ValueError as exc:
+ except (ValueError, OSError) as exc:
raise RuntimeError(str(exc))
handle = events.Handle(callback, args, self)
@@ -93,7 +93,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
if not self._signal_handlers:
try:
signal.set_wakeup_fd(-1)
- except ValueError as nexc:
+ except (ValueError, OSError) as nexc:
logger.info('set_wakeup_fd(-1) failed: %s', nexc)
if exc.errno == errno.EINVAL:
@@ -138,7 +138,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
if not self._signal_handlers:
try:
signal.set_wakeup_fd(-1)
- except ValueError as exc:
+ except (ValueError, OSError) as exc:
logger.info('set_wakeup_fd(-1) failed: %s', exc)
return True