This commit is contained in:
ThomasV 2017-07-13 11:28:37 +02:00
parent 61b8e23fad
commit f708ba0b34
1 changed files with 5 additions and 2 deletions

View File

@ -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