Merge pull request #3330 from SomberNight/dbb_clear_dialog
digitalbitbox: delegate clear_dialog() calls to GUI thread
This commit is contained in:
commit
0da1d4853b
|
@ -274,7 +274,7 @@ class DigitalBitbox_Client():
|
||||||
"To continue, touch the Digital Bitbox's light for 3 seconds.\r\n\r\n" \
|
"To continue, touch the Digital Bitbox's light for 3 seconds.\r\n\r\n" \
|
||||||
"To cancel, briefly touch the light or wait for the timeout."))
|
"To cancel, briefly touch the light or wait for the timeout."))
|
||||||
hid_reply = self.hid_send_encrypt(b'{"reset":"__ERASE__"}')
|
hid_reply = self.hid_send_encrypt(b'{"reset":"__ERASE__"}')
|
||||||
self.handler.clear_dialog()
|
self.handler.finished()
|
||||||
if 'error' in hid_reply:
|
if 'error' in hid_reply:
|
||||||
raise Exception(hid_reply['error']['message'])
|
raise Exception(hid_reply['error']['message'])
|
||||||
else:
|
else:
|
||||||
|
@ -300,7 +300,7 @@ class DigitalBitbox_Client():
|
||||||
"To cancel, briefly touch the light or wait for the timeout."))
|
"To cancel, briefly touch the light or wait for the timeout."))
|
||||||
msg = b'{"seed":{"source": "backup", "key": "%s", "filename": "%s"}}' % (key, backups['backup'][f].encode('utf8'))
|
msg = b'{"seed":{"source": "backup", "key": "%s", "filename": "%s"}}' % (key, backups['backup'][f].encode('utf8'))
|
||||||
hid_reply = self.hid_send_encrypt(msg)
|
hid_reply = self.hid_send_encrypt(msg)
|
||||||
self.handler.clear_dialog()
|
self.handler.finished()
|
||||||
if 'error' in hid_reply:
|
if 'error' in hid_reply:
|
||||||
raise Exception(hid_reply['error']['message'])
|
raise Exception(hid_reply['error']['message'])
|
||||||
return True
|
return True
|
||||||
|
@ -432,7 +432,7 @@ class DigitalBitbox_KeyStore(Hardware_KeyStore):
|
||||||
"To continue, touch the Digital Bitbox's blinking light for 3 seconds.\r\n\r\n" \
|
"To continue, touch the Digital Bitbox's blinking light for 3 seconds.\r\n\r\n" \
|
||||||
"To cancel, briefly touch the blinking light or wait for the timeout."))
|
"To cancel, briefly touch the blinking light or wait for the timeout."))
|
||||||
reply = dbb_client.hid_send_encrypt(msg) # Send twice, first returns an echo for smart verification (not implemented)
|
reply = dbb_client.hid_send_encrypt(msg) # Send twice, first returns an echo for smart verification (not implemented)
|
||||||
self.handler.clear_dialog()
|
self.handler.finished()
|
||||||
|
|
||||||
if 'error' in reply:
|
if 'error' in reply:
|
||||||
raise Exception(reply['error']['message'])
|
raise Exception(reply['error']['message'])
|
||||||
|
@ -564,7 +564,7 @@ class DigitalBitbox_KeyStore(Hardware_KeyStore):
|
||||||
|
|
||||||
# Send twice, first returns an echo for smart verification
|
# Send twice, first returns an echo for smart verification
|
||||||
reply = dbb_client.hid_send_encrypt(msg)
|
reply = dbb_client.hid_send_encrypt(msg)
|
||||||
self.handler.clear_dialog()
|
self.handler.finished()
|
||||||
|
|
||||||
if 'error' in reply:
|
if 'error' in reply:
|
||||||
raise Exception(reply['error']['message'])
|
raise Exception(reply['error']['message'])
|
||||||
|
|
Loading…
Reference in New Issue