fix #812
This commit is contained in:
parent
5a20d07fb8
commit
3a8b4d4258
|
@ -465,22 +465,22 @@ class DongleWaitingDialog(QThread):
|
||||||
if BTCHIP:
|
if BTCHIP:
|
||||||
waitDialog = DongleWaitingDialog()
|
waitDialog = DongleWaitingDialog()
|
||||||
|
|
||||||
# Tickle the UI a bit while waiting
|
# Tickle the UI a bit while waiting
|
||||||
class DongleWaitQT(DongleWait):
|
class DongleWaitQT(DongleWait):
|
||||||
def __init__(self, dongle):
|
def __init__(self, dongle):
|
||||||
self.dongle = dongle
|
self.dongle = dongle
|
||||||
|
|
||||||
def waitFirstResponse(self, timeout):
|
def waitFirstResponse(self, timeout):
|
||||||
customTimeout = 0
|
customTimeout = 0
|
||||||
while customTimeout < timeout:
|
while customTimeout < timeout:
|
||||||
try:
|
try:
|
||||||
response = self.dongle.waitFirstResponse(200)
|
response = self.dongle.waitFirstResponse(200)
|
||||||
return response
|
return response
|
||||||
except USBError, e:
|
except USBError, e:
|
||||||
if e.backend_error_code == -7:
|
if e.backend_error_code == -7:
|
||||||
QApplication.processEvents()
|
QApplication.processEvents()
|
||||||
customTimeout = customTimeout + 100
|
customTimeout = customTimeout + 100
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
raise e
|
raise e
|
||||||
|
|
Loading…
Reference in New Issue