An uninitialized variable in a x11-misc/driconf-0.9.1 file causes python to complain. I start driconf from a terminal without a pre-existing ~/.drirc configuration file. I open the "Application settings" dropdown at the bottom of the page. I select "Add", and put in doom3-demo and doom.x86 in the dialog fields, and select "OK". At this point driconf spews forth it's displeasure upon stderr: Code: Traceback (most recent call last): File "/usr/lib/driconf/driconf_simpleui.py", line 692, in changeApp self.selectApp(app) File "/usr/lib/driconf/driconf_simpleui.py", line 641, in selectApp self.appPage = AppPage (self.driver, app) File "/usr/lib/driconf/driconf_simpleui.py", line 347, in __init__ self.refreshOptions() File "/usr/lib/driconf/driconf_simpleui.py", line 369, in refreshOptions self.optionTree.append(sectIter, [ File "/usr/lib/driconf/driconf_simpleui.py", line 271, in lineWrap head, tail = head + tail[:i] + '\n', tail[j:] UnboundLocalError: local variable 'j' referenced before assignment It must be a python interpreter change. It seems like variables must be initialized before being used... To fix it, add "j = i" at line 260 in /usr/lib/driconf/driconf_simpleui.py, after the existing line "i = chars" Reproducible: Always Steps to Reproduce:
Created attachment 109684 [details, diff] patch to fix python error This will fix the error described above.
This should be filed upstream. Please open a bug in driconf's bug tracker at http://sourceforge.net/projects/driconf and post the link or bug # here. Thanks!
done.
Perhaps we could do a revision bump until it gets fixed upstream.
Like other X packages, I don't really like maintaining a patch set that doesn't match what upstream is doing. You're more than welcome to post an ebuild that uses your patch, and if upstream doesn't do anything about it any time soon we may put it into the tree anyway.