From d2a133191bb84f4b884e7d287520e5265c18d2a5 Mon Sep 17 00:00:00 2001 From: imonlinux <39863321+imonlinux@users.noreply.github.com> Date: Fri, 21 Nov 2025 17:00:25 -0800 Subject: [PATCH] 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. --- linux_voice_assistant/__main__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/linux_voice_assistant/__main__.py b/linux_voice_assistant/__main__.py index 33077f9..e56abdd 100644 --- a/linux_voice_assistant/__main__.py +++ b/linux_voice_assistant/__main__.py @@ -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():