From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.3) Gecko/20040910 Description of problem: When the LANG locale is set to something else than "C", "en" or any "en_XX", redhat-print-config and redhat-config-printer-gui will not work. This issue is caused by the following command in Python scripts: signal.signal (signal.SIGCHLD, signal.SIG_DFL) -> f = os.popen ('/usr/sbin/alternatives --display print') for l in f.readlines (): if l.startswith (" link currently points to"): which = l.split ('.')[1].strip () The output of '/usr/sbin/alternatives --display print' may not be in English. To correct this problem, one should use instead:` signal.signal (signal.SIGCHLD, signal.SIG_DFL) -> f = os.popen ('LANG=C /usr/sbin/alternatives --display print') for l in f.readlines (): if l.startswith (" link currently points to"): which = l.split ('.')[1].strip () Those lines are found in 3 different scripts: - /usr/share/printconf/util/cups_import.py - /usr/share/printconf/util/printconf_conf.py - /usr/share/printconf/util/queueTree.py Version-Release number of selected component (if applicable): redhat-config-printer-0.6.47.3.19-1 How reproducible: Always Steps to Reproduce: 1. lang=fr_CA redhat-config-print Actual Results: The program crash and outputs: Traceback (most recent call last): File "/usr/sbin/printconf", line 9, in ? import queueTree File "/usr/share/printconf/util/queueTree.py", line 945, in ? queueTree() File "/usr/share/printconf/util/queueTree.py", line 222, in __init__ self.active_spooler = self.get_active_spooler () File "/usr/share/printconf/util/queueTree.py", line 243, in get_active_spooler return which UnboundLocalError: local variable 'which' referenced before assignment Expected Results: A GUI should appear. I should be able to configure my printer via this GUI. Additional info: The solution for this bug was submitted by Juan Carlos Castro y Castro <jcastro.br> in the Tao-discuss mailing list. http://mailman.taolinux.org/pipermail/tao-discuss/2004-November/000702.html
Created attachment 107484 [details] Patch to correct this bug
*** This bug has been marked as a duplicate of 131563 ***