tkeepkey: fix threading issue during recovery - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit fcfe3406b33e6a8304d91d22fe84ef87883d461f DIR parent 76e2fadc31c5274b9d572fa22f9eda1358bbad73 HTML Author: SomberNight <somber.night@protonmail.com> Date: Tue, 1 May 2018 14:11:34 +0200 keepkey: fix threading issue during recovery Diffstat: M plugins/keepkey/qt_generic.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- DIR diff --git a/plugins/keepkey/qt_generic.py b/plugins/keepkey/qt_generic.py t@@ -132,11 +132,13 @@ class QtHandler(QtHandlerBase): char_signal = pyqtSignal(object) pin_signal = pyqtSignal(object) + close_char_dialog_signal = pyqtSignal() def __init__(self, win, pin_matrix_widget_class, device): super(QtHandler, self).__init__(win, device) self.char_signal.connect(self.update_character_dialog) self.pin_signal.connect(self.pin_dialog) + self.close_char_dialog_signal.connect(self._close_char_dialog) self.pin_matrix_widget_class = pin_matrix_widget_class self.character_dialog = None t@@ -146,9 +148,13 @@ class QtHandler(QtHandlerBase): self.done.wait() data = self.character_dialog.data if not data or 'done' in data: + self.close_char_dialog_signal.emit() + return data + + def _close_char_dialog(self): + if self.character_dialog: self.character_dialog.accept() self.character_dialog = None - return data def get_pin(self, msg): self.done.clear()