mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-04 04:45:16 +00:00
Get rid of libusb dependency
This commit is contained in:
parent
7a3ddfc6a4
commit
db68dcbc14
1 changed files with 2 additions and 14 deletions
|
@ -20,7 +20,6 @@ from electrum.util import format_satoshis
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from usb.core import USBError
|
|
||||||
from btchip.btchipComm import getDongle, DongleWait
|
from btchip.btchipComm import getDongle, DongleWait
|
||||||
from btchip.btchip import btchip
|
from btchip.btchip import btchip
|
||||||
from btchip.btchipUtils import compress_public_key,format_transaction, get_regular_input_script
|
from btchip.btchipUtils import compress_public_key,format_transaction, get_regular_input_script
|
||||||
|
@ -502,16 +501,5 @@ if BTCHIP:
|
||||||
self.dongle = dongle
|
self.dongle = dongle
|
||||||
|
|
||||||
def waitFirstResponse(self, timeout):
|
def waitFirstResponse(self, timeout):
|
||||||
customTimeout = 0
|
return self.dongle.waitFirstResponse(timeout)
|
||||||
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
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue