electrum

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

commit f708ba0b34f4b5b5a64b7bc0abc7e46a9dcbe661
parent 61b8e23fad55aa47d77cc853e57a30636f43ad88
Author: ThomasV <thomasv@electrum.org>
Date:   Thu, 13 Jul 2017 11:28:37 +0200

fix #2603

Diffstat:
Mlib/qrscanner.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/qrscanner.py b/lib/qrscanner.py @@ -66,9 +66,12 @@ def _find_system_cameras(): devices = {} # Name -> device if os.path.exists(device_root): for device in os.listdir(device_root): - name = open(os.path.join(device_root, device, 'name')).read() + try: + name = open(os.path.join(device_root, device, 'name')).read() + except IOError: + continue name = name.strip('\n') - devices[name] = os.path.join("/dev",device) + devices[name] = os.path.join("/dev", device) return devices