electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 851fe0dad512dbf9888638566135d1f8cd0dd853
parent 7d2b47a5bf2257727cdfca14be1100fc6cf23776
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue,  6 Mar 2018 11:22:49 +0100

fix #4036

Diffstat:
Mgui/qt/qrtextedit.py | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gui/qt/qrtextedit.py b/gui/qt/qrtextedit.py @@ -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