improved get_devices log

This commit is contained in:
sezanzeb 2020-11-21 15:07:08 +01:00
parent 373792f9a6
commit aa8a1b4f3f

View File

@ -133,5 +133,9 @@ def get_devices():
_GetDevicesProcess(pipe[1]).start() _GetDevicesProcess(pipe[1]).start()
# block until devices are available # block until devices are available
_devices = pipe[0].recv() _devices = pipe[0].recv()
logger.info('Found %s', ', '.join([f'"{name}"' for name in _devices])) if len(_devices) == 0:
logger.error('Did not find any device')
else:
names = [f'"{name}"' for name in _devices]
logger.info('Found %s', ', '.join(names))
return _devices return _devices