From db68dcbc14bce870bdb8f632f494375dae871964 Mon Sep 17 00:00:00 2001 From: BTChip Date: Sat, 13 Jun 2015 11:58:57 +0200 Subject: [PATCH] Get rid of libusb dependency --- plugins/btchipwallet.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/plugins/btchipwallet.py b/plugins/btchipwallet.py index e1aec9dc6..22b2d6cef 100644 --- a/plugins/btchipwallet.py +++ b/plugins/btchipwallet.py @@ -20,7 +20,6 @@ from electrum.util import format_satoshis import hashlib try: - from usb.core import USBError from btchip.btchipComm import getDongle, DongleWait from btchip.btchip import btchip from btchip.btchipUtils import compress_public_key,format_transaction, get_regular_input_script @@ -502,16 +501,5 @@ if BTCHIP: self.dongle = dongle def waitFirstResponse(self, timeout): - customTimeout = 0 - while customTimeout < timeout: - try: - response = self.dongle.waitFirstResponse(200) - return response - except USBError, e: - if e.backend_error_code == -7: - QApplication.processEvents() - customTimeout = customTimeout + 100 - pass - else: - raise e - raise e + return self.dongle.waitFirstResponse(timeout) +