[Pkg-bitcoin-commits] [python-quamash] 69/269: be sure to return the _Cancelable (may want to rename this Handle, in order to fit with asyncio's naming convention)

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:17 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 85d5e9923918b1e91dd38b24b9462fea5d1a5e23
Author: Mark Harviston <mark.harviston at gmail.com>
Date:   Thu Jul 10 21:25:12 2014 -0700

    be sure to return the _Cancelable
    (may want to rename this Handle, in order to fit with asyncio's naming convention)
---
 quamash/__init__.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/quamash/__init__.py b/quamash/__init__.py
index 68c08d2..f04f2a3 100644
--- a/quamash/__init__.py
+++ b/quamash/__init__.py
@@ -265,7 +265,7 @@ class QEventLoop(_baseclass):
 		self._logger.debug(
 			'Registering callback {} to be invoked with arguments {} after {} second(s)'
 			.format(callback, args, delay))
-		self._add_callback(asyncio.Handle(callback, args, self), delay)
+		return self._add_callback(asyncio.Handle(callback, args, self), delay)
 
 	def _add_callback(self, handle, delay=0):
 		def upon_timeout():
@@ -283,11 +283,11 @@ class QEventLoop(_baseclass):
 		return _Cancellable(timer, self)
 
 	def call_soon(self, callback, *args):
-		self.call_later(0, callback, *args)
+		return self.call_later(0, callback, *args)
 
 	def call_at(self, when, callback, *args):
 		"""Register callback to be invoked at a certain time."""
-		self.call_later(when - self.time(), callback, *args)
+		return self.call_later(when - self.time(), callback, *args)
 
 	def time(self):
 		"""Get time according to event loop's clock."""

-- 
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