mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-05 05:15:12 +00:00
fix #4036
This commit is contained in:
parent
7d2b47a5bf
commit
851fe0dad5
1 changed files with 7 additions and 3 deletions
|
@ -46,9 +46,13 @@ class ScanQRTextEdit(ButtonsTextEdit, MessageBoxMixin):
|
|||
fileName, __ = QFileDialog.getOpenFileName(self, 'select file')
|
||||
if not fileName:
|
||||
return
|
||||
with open(fileName, "r") as f:
|
||||
data = f.read()
|
||||
self.setText(data)
|
||||
try:
|
||||
with open(fileName, "r") as f:
|
||||
data = f.read()
|
||||
except BaseException as e:
|
||||
self.show_error(_('Error opening file') + ':\n' + str(e))
|
||||
else:
|
||||
self.setText(data)
|
||||
|
||||
def qr_input(self):
|
||||
from electrum import qrscanner, get_config
|
||||
|
|
Loading…
Add table
Reference in a new issue