[Pkg-bitcoin-commits] [python-quamash] 125/269: Fix potential timer problem
Jonas Smedegaard
dr at jones.dk
Fri Nov 24 11:26:23 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 3b57ac6ef18dd0b51b18423e1c3f0ba09e060458
Author: Arve Knudsen <arve.knudsen at gmail.com>
Date: Fri Jul 25 12:16:31 2014 +0200
Fix potential timer problem
---
quamash/__init__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/quamash/__init__.py b/quamash/__init__.py
index 57d6998..777d066 100644
--- a/quamash/__init__.py
+++ b/quamash/__init__.py
@@ -306,16 +306,17 @@ class QEventLoop(_baseclass):
def _add_callback(self, handle, delay=0):
def upon_timeout():
+ assert timer in self.__timers, 'Timer {} not among {}'.format(timer, self.__timers)
self.__timers.remove(timer)
self._logger.debug('Callback timer fired, calling {}'.format(handle))
handle._run()
self._logger.debug('Adding callback {} with delay {}'.format(handle, delay))
timer = QtCore.QTimer(self.__app)
+ self.__timers.append(timer)
timer.timeout.connect(upon_timeout)
timer.setSingleShot(True)
timer.start(delay * 1000)
- self.__timers.append(timer)
return _Cancellable(timer, self)
--
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