Bug 149779 - crash with single-name devices
Summary: crash with single-name devices
Status: CLOSED DUPLICATE of bug 142801
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-soundcard   
(Show other bugs)
Version: 3
Hardware: i386 Linux
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-02-26 15:54 UTC by Adam Ambrose
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-02 17:02:11 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Adam Ambrose 2005-02-26 15:54:49 UTC
Description of problem:
I have two sound devices; one is standard, and the other is a usb
logitech web camera.   This 2nd device shows up in the "Sound cards"
list of the hardware browser with the name of "Camera".

When I run system-config-soundcard, I get the following traceback:

Traceback (most recent call last):
"/usr/share/system-config-soundcard/system-config-soundcard.py", line
46, in ?
    app = soundcard.childWindow()
  File "/usr/share/system-config-soundcard/soundcard.py", line 87, in
    self.device, self.module, self.maker, self.model =
  File "/usr/share/system-config-soundcard/soundcardBackend.py", line
106, in getData
    maker, model = string.split(description, " ", 1)
ValueError: unpack list of wrong size

When I added a "print description" right before the breaking line, I
noticed that the description was just "Camera".  So I added the
following to handle descriptions with no spaces:

--- soundcardBackend.py 2005-02-26 07:44:03.116916632 -0800
+++ soundcardBackend.py.modified        2005-02-26 07:43:51.838631192
@@ -102,8 +102,11 @@
         device, module, description = card
        if (string.count(description,"|") == 1):
             maker, model = string.split(description, "|")
-       else:
+       elif (string.count(description," ") == 1):
            maker, model = string.split(description, " ", 1)
+       else:
+           maker = description
+           model = ""
         return device, module, maker, model

     def playTestSound(self, module, index):

This fixed this problem, but I still ran into a problem:

DeprecationWarning: use gtk .ComboBox
  self.primaryDeviceOptionMenu = gtk.OptionMenu()
Traceback (most recent call last):
"/usr/share/system-config-soundcard/system-config-soundcard.py", line
46,  in ?
    app = soundcard.childWindow()
  File "/usr/share/system-config-soundcard/soundcard.py", line 159, in
ValueError: list.index(x): x not in list

At this point, I lost patience.  :) I just unplugged my usb camera,
and system-config-soundcard configured my standard sound card just fine.

Version-Release number of selected component (if applicable):

How reproducible:
Every time, if you have a sound card device that only shows up with
one name in its description.

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Bastien Nocera 2005-04-02 17:02:11 UTC

*** This bug has been marked as a duplicate of 142801 ***

Note You need to log in before you can comment on or make changes to this bug.