tfix #4238 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 35b3294a5df92ba6ea42d81fba856547b5896ab6 DIR parent ee2a1f52a1dd570d3dc460b969cecebbb7e433c3 HTML Author: SomberNight <somber.night@protonmail.com> Date: Mon, 9 Apr 2018 12:00:37 +0200 fix #4238 Diffstat: M gui/kivy/main_window.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) --- DIR diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -400,12 +400,15 @@ class ElectrumWindow(App): intent = Intent(PythonActivity.mActivity, SimpleScannerActivity) def on_qr_result(requestCode, resultCode, intent): - if resultCode == -1: # RESULT_OK: - # this doesn't work due to some bug in jnius: - # contents = intent.getStringExtra("text") - String = autoclass("java.lang.String") - contents = intent.getStringExtra(String("text")) - on_complete(contents) + try: + if resultCode == -1: # RESULT_OK: + # this doesn't work due to some bug in jnius: + # contents = intent.getStringExtra("text") + String = autoclass("java.lang.String") + contents = intent.getStringExtra(String("text")) + on_complete(contents) + finally: + activity.unbind(on_activity_result=on_qr_result) activity.bind(on_activity_result=on_qr_result) PythonActivity.mActivity.startActivityForResult(intent, 0)