mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
parent
7d84409628
commit
1ec71cbaca
1 changed files with 3 additions and 2 deletions
|
@ -74,10 +74,11 @@ def _find_system_cameras():
|
|||
devices = {} # Name -> device
|
||||
if os.path.exists(device_root):
|
||||
for device in os.listdir(device_root):
|
||||
path = os.path.join(device_root, device, 'name')
|
||||
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()
|
||||
except IOError:
|
||||
except Exception:
|
||||
continue
|
||||
name = name.strip('\n')
|
||||
devices[name] = os.path.join("/dev", device)
|
||||
|
|
Loading…
Add table
Reference in a new issue