summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/events.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2013-11-27 18:37:13 (GMT)
committerGuido van Rossum <guido@python.org>2013-11-27 18:37:13 (GMT)
commitcced076218b057067294f91f07df784aff8ea774 (patch)
treeed3ee7456b4b576270f1b1835825930a74878032 /Lib/asyncio/events.py
parent1314ef73d023f10abb6705c386d2a39d692d413b (diff)
downloadcpython-cced076218b057067294f91f07df784aff8ea774.zip
cpython-cced076218b057067294f91f07df784aff8ea774.tar.gz
cpython-cced076218b057067294f91f07df784aff8ea774.tar.bz2
asyncio: Fix get_event_loop() to call set_event_loop() when setting the loop. By Anthony Baire.
Diffstat (limited to 'Lib/asyncio/events.py')
-rw-r--r--Lib/asyncio/events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 36ae312..d429686 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -360,7 +360,7 @@ class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy):
if (self._local._loop is None and
not self._local._set_called and
isinstance(threading.current_thread(), threading._MainThread)):
- self._local._loop = self.new_event_loop()
+ self.set_event_loop(self.new_event_loop())
assert self._local._loop is not None, \
('There is no current event loop in thread %r.' %
threading.current_thread().name)