GeorgeFilipkin / pulsemixer

CLI and curses mixer for PulseAudio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IndexError on first run

yourealwaysbe opened this issue · comments

This is using pipewire on Arch Linux. If running pulsemixer --list immediately after booting the system, there is a crash with an IndexError:

$ pulsemixer --list
Traceback (most recent call last):
  File "/sbin/pulsemixer", line 2054, in <module>
    main()
  File "/sbin/pulsemixer", line 1968, in main
    index = 'sink-{}'.format([s.index for s in sinks if s.name == server_info.default_sink_name][0])
IndexError: list index out of range

I guess this is pipewire not initialsing fast enough and returning either an empty list of sinks or not specifying a default sink. It's not a major issue, but could be more defensive.