tfix #2603 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f708ba0b34f4b5b5a64b7bc0abc7e46a9dcbe661 DIR parent 61b8e23fad55aa47d77cc853e57a30636f43ad88 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 13 Jul 2017 11:28:37 +0200 fix #2603 Diffstat: M lib/qrscanner.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/qrscanner.py b/lib/qrscanner.py t@@ -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