Skip to content

Fix issue #34 #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions quamash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,14 @@ def call_later(self, delay, callback, *args):

def _add_callback(self, handle, delay=0):
def upon_timeout():
nonlocal timer
nonlocal handle
assert timer in self.__timers, 'Timer {} not among {}'.format(timer, self.__timers)
self.__timers.remove(timer)
timer = None
self._logger.debug('Callback timer fired, calling {}'.format(handle))
handle._run()
handle = None

self._logger.debug('Adding callback {} with delay {}'.format(handle, delay))
timer = QtCore.QTimer(self.__app)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_qeventloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ def fut_cb(fut):


@pytest.mark.parametrize('use_quamash',
[pytest.mark.xfail(True, reason="bug34"), False]
[True, False]
)
def test_exception_handler(use_quamash, loop):
handler_called = False
Expand Down