electrum

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

commit 4901aebde0b3168fc22f4e79df9b715a84b76b28
parent 933596510e702b09b488a37d3b1386278afe7043
Author: ThomasV <thomasv@electrum.org>
Date:   Tue,  9 Feb 2016 19:45:14 +0100

kivy: do not crash app if there's no barcode scanner

Diffstat:
Mgui/kivy/main_window.py | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -277,8 +277,10 @@ class ElectrumWindow(App): if intent.getStringExtra("SCAN_RESULT_FORMAT") == 'QR_CODE': on_complete(contents) activity.bind(on_activity_result=on_qr_result) - PythonActivity.mActivity.startActivityForResult(intent, 0) - + try: + PythonActivity.mActivity.startActivityForResult(intent, 0) + except: + self.show_error('Could not start Barcode Scanner') def build(self): return Builder.load_file('gui/kivy/main.kv')