[Pkg-bitcoin-commits] [python-quamash] 202/269: Fix past two commits
Jonas Smedegaard
dr at jones.dk
Fri Nov 24 11:26:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository python-quamash.
commit 19d9cae619a197197b73c437f91059b0511fe401
Author: Mark Harviston <mark.harviston at gmail.com>
Date: Thu Jan 15 16:00:41 2015 -0800
Fix past two commits
I should not code/git while sleepy.
See I was attempting to make nice little chunks.
But now I have 2 nice little chunks, that both have breaking changes.
And then this chunk that fixes bugs in both of them.
I fear I have failed humanity.
---
quamash/__init__.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/quamash/__init__.py b/quamash/__init__.py
index 16159f5..a5daf0c 100644
--- a/quamash/__init__.py
+++ b/quamash/__init__.py
@@ -13,6 +13,7 @@ import os
import asyncio
import time
from functools import wraps
+import itertools
from queue import Queue
from concurrent.futures import Future
import logging
@@ -200,6 +201,7 @@ def _easycallback(fn):
... myobject.mycallback()
>>>
>>> loop = QEventLoop(app)
+ >>> asyncio.set_event_loop(loop)
>>> with loop:
... loop.run_until_complete(mycoroutine())
"""
@@ -239,7 +241,9 @@ class QEventLoop(_baseclass):
... assert x + y == 4
... yield from asyncio.sleep(.1)
>>>
- >>> with QEventLoop(app) as loop:
+ >>> loop = QEventLoop(app)
+ >>> asyncio.set_event_loop(loop)
+ >>> with loop:
... loop.run_until_complete(xplusy(2, 2))
"""
@@ -321,8 +325,8 @@ class QEventLoop(_baseclass):
self.__app = None
- for notifier in (*self._read_notifiers, *self._write_notifiers):
- notifer.setEnabled(False)
+ for notifier in itertools.chain(self._read_notifiers.values(), self._write_notifiers.values()):
+ notifier.setEnabled(False)
self._read_notifiers = None
self._write_notifiers = None
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git
More information about the Pkg-bitcoin-commits
mailing list