Browse Source

follow-up prev

fix #4078
3.2.x
SomberNight 7 years ago
parent
commit
1ec71cbaca
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/qrscanner.py

5
electrum/qrscanner.py

@ -74,10 +74,11 @@ def _find_system_cameras():
devices = {} # Name -> device devices = {} # Name -> device
if os.path.exists(device_root): if os.path.exists(device_root):
for device in os.listdir(device_root): for device in os.listdir(device_root):
path = os.path.join(device_root, device, 'name')
try: try:
with open(os.path.join(device_root, device, 'name'), encoding='utf-8') as f: with open(path, encoding='utf-8') as f:
name = f.read() name = f.read()
except IOError: except Exception:
continue continue
name = name.strip('\n') name = name.strip('\n')
devices[name] = os.path.join("/dev", device) devices[name] = os.path.join("/dev", device)

Loading…
Cancel
Save