Skip to content

Commit

Permalink
Improve error message of audio_switcher.get_default_sink_name()
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRisch committed Jan 10, 2021
1 parent dd70a9e commit b8744f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/audio_switcher.py
Expand Up @@ -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()
Expand Down

0 comments on commit b8744f4

Please sign in to comment.