self._mixers[0] Index out of range on start
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gmixer |
New
|
Undecided
|
Unassigned |
Bug Description
On Arch Linux x86_64, gmixer version 1.3, I get an IndexError exception when I try to start gmixer.
Here's the traceback.
Traceback (most recent call last):
File "/usr/bin/gmixer", line 1168, in <module>
GMixer(
File "/usr/bin/gmixer", line 592, in __init__
self.
File "/usr/bin/gmixer", line 749, in _load_defaults
self.
IndexError: list index out of range
It occurs in:
def _load_defaults(
# Prefer alsamixer by default
for mixer in self._mixers:
if mixer.get_
else:
The for block is obviously wrong here, because it improperly handles the case where ``self._mixers`` is empty. There should be a test first to see if ``self._mixers`` is ``True``.
if self._mixers:
for mixer in self._mixers:
if mixer.get_
else:
else:
# print a helpful error message or find an alternative way
As for the issue, I have ``alsamixer`` run just fine, so I find it odd that gmixer is not able to find any mixers at all. Why is this happening?
I've just tried this with the bzr version (@ Mon May 24 01:38:55 CEST 2010), and the results are the same.