summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-23 16:21:45 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-23 16:21:45 (GMT)
commitc4c464911ab6a65a32b8b2162aa4537003efb87b (patch)
tree369d3f7c444adf385ed99346870dce3f894da3bd /Lib/asyncio
parent8966759b031ce9977e038c5db1d8ed47c6c827a6 (diff)
downloadcpython-c4c464911ab6a65a32b8b2162aa4537003efb87b.zip
cpython-c4c464911ab6a65a32b8b2162aa4537003efb87b.tar.gz
cpython-c4c464911ab6a65a32b8b2162aa4537003efb87b.tar.bz2
asyncio: sync with Tulip
* Tulip issue 194: Don't use sys.getrefcount() in unit tests * signal.set_wakeup_fd() can now raise an OSError on Python 3.5
Diffstat (limited to 'Lib/asyncio')
-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