Bug 135435

Summary: redhat-config-printer doesn't execute when the environment variable LANG is set to spanish
Product: Red Hat Enterprise Linux 3 Reporter: Mariano Fernandez <mfernandez>
Component: redhat-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:06:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mariano Fernandez 2004-10-12 18:08:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040922

Description of problem:
when the environment variable LANG is set to es_ES
redhat-config-printer crashes with the following error:

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


Looking in the code of /usr/share/printconf/util/cups_import.py I saw
that in line 190:
       if l.startswith (" link currently points to"):
there is a reference to the output of the command "alternative", wich
in prior versions output allways in english, but now it outputs
depending on the LANG variable.
So, the python script can't determine wich spooler is the system using.


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

How reproducible:
Always

Steps to Reproduce:
1. Ensure that you are using chkconfig-1.3.11-0.3
2. export LANG=es_ES
3. execute redhat-config-printer
    

Additional info:

Comment 1 Tim Waugh 2004-10-13 13:10:29 UTC

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

Comment 2 Red Hat Bugzilla 2006-02-21 19:06:16 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.