ThomasV 8 years ago
parent
commit
f708ba0b34
  1. 7
      lib/qrscanner.py

7
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

Loading…
Cancel
Save