From b8744f49b123c90907d6ec623734b8eeb3c89d96 Mon Sep 17 00:00:00 2001 From: David Risch Date: Sun, 10 Jan 2021 16:42:00 +0100 Subject: [PATCH] Improve error message of audio_switcher.get_default_sink_name() --- scripts/audio_switcher.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/audio_switcher.py b/scripts/audio_switcher.py index 55f7b99..e2d1672 100755 --- a/scripts/audio_switcher.py +++ b/scripts/audio_switcher.py @@ -208,7 +208,9 @@ def get_default_sink_name(): if matches is not None: return matches.group(1) - raise RuntimeError('No default sink was found.') + raise RuntimeError('Unable to determine the default sink. ' + 'Workaround: Fill out the "normal_sink_regex" field in the config file.\n\n' + 'Output of `pactl info`:\n{}'.format(process.stdout.decode())) def get_port(self): cards = pactl_interface.Card.get_all_cards()