Update __main__.py
File: linux_voice_assistant/__main__.py In _init_basics(), the --list-output-devices block is updated so that: It exits with 0 on success. It exits with 1 only if an exception occurs.
This commit is contained in:
@@ -171,16 +171,14 @@ def _init_basics() -> Tuple[Config, asyncio.AbstractEventLoop, EventBus]:
|
||||
|
||||
if args.list_output_devices:
|
||||
print("Output devices\n" + "=" * 14)
|
||||
exit_code = 0
|
||||
try:
|
||||
player = MpvMediaPlayer(loop=None)
|
||||
for speaker in player.player.audio_device_list:
|
||||
print(speaker["name"] + ":", speaker["description"])
|
||||
except Exception as e:
|
||||
_LOGGER.error("Failed to list output devices: %s", e)
|
||||
exit_code = 1
|
||||
|
||||
sys.exit(exit_code)
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
||||
config_path = args.config
|
||||
if not config_path.is_absolute():
|
||||
|
||||
Reference in New Issue
Block a user