electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 410ac8266736995cc71dc187212aca2884d3b166
parent 374daa25afd06237b07a6b1abed2c8fcc648e22b
Author: ThomasV <thomasv@gitorious>
Date:   Wed, 10 Sep 2014 10:16:07 +0200

Do not call Qt from non-Qt threads, this will segfault (give_error)

Diffstat:
Mplugins/trezor.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/plugins/trezor.py b/plugins/trezor.py @@ -7,15 +7,16 @@ from time import sleep from base64 import b64encode, b64decode import electrum -from electrum_gui.qt.password_dialog import make_password_dialog, run_password_dialog -from electrum_gui.qt.util import ok_cancel_buttons, EnterButton from electrum.account import BIP32_Account from electrum.bitcoin import EncodeBase58Check, public_key_to_bc_address, bc_address_to_hash_160 from electrum.i18n import _ from electrum.plugins import BasePlugin, hook from electrum.transaction import deserialize from electrum.wallet import NewWallet +from electrum.util import print_error +from electrum_gui.qt.password_dialog import make_password_dialog, run_password_dialog +from electrum_gui.qt.util import ok_cancel_buttons, EnterButton try: from trezorlib.client import types @@ -32,7 +33,7 @@ def log(msg): stderr.flush() def give_error(message): - QMessageBox.warning(QDialog(), _('Warning'), _(message), _('OK')) + print_error(message) raise Exception(message) class Plugin(BasePlugin):