Bug 138290 - redhat-config-printer crashes with LANG=de_DE
redhat-config-printer crashes with LANG=de_DE
Status: CLOSED DUPLICATE of bug 131563
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: redhat-config-printer (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-07 11:19 EST by Joachim Jaeckel
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:06:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Joachim Jaeckel 2004-11-07 11:19:18 EST
Description of problem:
on a system with a non-standard language setting, e.g. LANG=de_DE
redhat-config-printer crashes with python traceback.

Version-Release number of selected component (if applicable):
redhat-config-printer-0.6.47.3.19-1

How reproducible:
Every time

Steps to Reproduce:
1. be root
2. export LANG=de_DE
3. redhat-config-printer
  
Actual results:
Traceback (most recent call last):
  File "/usr/sbin/redhat-config-printer", line 9, in ?
    import queueTree
  File "/usr/share/printconf/util/queueTree.py", line 945, in ?
    queueTree()
  File "/usr/share/printconf/util/queueTree.py", line 102, in __init__
    if cups_import.import_needed ():
  File "/usr/share/printconf/util/cups_import.py", line 200, in 
import_needed
    which = which_spooler ()
  File "/usr/share/printconf/util/cups_import.py", line 195, in 
which_spooler
    return which
UnboundLocalError: local variable 'which' referenced before assignment


Expected results:
Printer configuration window appears

Additional info:
similar errormessage appears at boot time from /etc/rc3.d/S55cups
on a system with LANG="de_DE" in /etc/sysconfig/i18n

Reason of this problem:
file /usr/share/printconf/util/cups_import.py" lines 188 - 190
calls '/usr/sbin/alternatives --display print' and looks for the
string " link currently points to". If you do not use the standart
language in your system, this string will not be found.
Same construction in two other files in /usr/share/printconf/util/

Workaround:
file /usr/share/printconf/util/cups_import.py line 188
file /usr/share/printconf/util/printconf_conf.py line 1049
file /usr/share/printconf/util/queueTree.py line 236
change
   f = os.popen ('/usr/sbin/alternatives --display print')
to
   f = os.popen ('LC_ALL=C /usr/sbin/alternatives --display print')
Comment 1 Robert Scheck 2004-11-07 17:50:25 EST
Jupp, I've got the same problem at work using U3 for example, it would 
be very nice to get a official fix with a rpm update for U4.
Comment 2 Tim Waugh 2004-11-08 11:06:24 EST

*** This bug has been marked as a duplicate of 131563 ***
Comment 3 Red Hat Bugzilla 2006-02-21 14:06:49 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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