SomberNight
7 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
3 additions and
2 deletions
-
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) |
|
|