fix #2603
This commit is contained in:
parent
61b8e23fad
commit
f708ba0b34
|
@ -66,9 +66,12 @@ 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):
|
||||||
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')
|
name = name.strip('\n')
|
||||||
devices[name] = os.path.join("/dev",device)
|
devices[name] = os.path.join("/dev", device)
|
||||||
return devices
|
return devices
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue