Changeset 2708

Show
Ignore:
Timestamp:
08/26/17 22:07:23 (3 weeks ago)
Author:
jwoithe
Message:

saffire_dice: allow for trailing space in ConfigROM model name.

Under certain conditions, the model name returned by configrom.getModelName()
can include trailing spaces. There is a vague recollection that a change
in the kernel or libraw1394 at some point in the past might give rise to
this, but no reference can be immediately tracked down. To address this,
simply use the rstrip() method to remove trailing white space. This ensures
that the code continues to work with or without the trailing white space.

This issue caused ffado-mixer to exit with an error complaining that
GlobalMute? was not defined for the Saffire mixer widget. Due to the
unexpected white space, the device name never matched any of the expected
names and therefore the appropriate UI file (which created the GlobalMute?
objects, among many others) was never loaded.

Thanks to Dominik Meister for reporting the problem, running further tests
to confirm the fundamental cause and suggesting the fix.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py

    r2694 r2708  
    8181        widget = QWidget() 
    8282 
    83         ModelName = self.configrom.getModelName() 
     83        ModelName = self.configrom.getModelName().rstrip() 
    8484        if ffado.config.bypassdbus: 
    8585            # A hack for the bypassdbus case, where ModelName has a slightly