Bug 192807

Summary: s-c-p crashes if used with non-C locale
Product: [Fedora] Fedora Reporter: Anton Guda <atu.guda>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideKeywords: i18n
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.7.10-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-30 09:45:27 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:
Bug Depends On:    
Bug Blocks: 150223    

Description Anton Guda 2006-05-23 10:26:41 UTC
Description of problem:
When system-config-printer called with non-C
locale, crash occurs, traceback is dumped.


Version-Release number of selected component (if applicable):
system-config-printer-0.7.8-1


How reproducible:
Every time

Steps to Reproduce:
1. LANG=ru_RU.KOI8-R system-config-printer
2.  or LANG=fr_FR.UTF-8 .. same result
3. LANG=C system-config-printer
  
Actual results:
Works only with C locale.


Expected results:
Works with any locale (may be set to 'C' internaly).

Additional info:
Traceback:

[atu@nt ~]$ LANG=ru_RU.KOI8-R system-config-printer
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 1931, 
in ?
    main()
  File "/usr/share/system-config-printer/system-config-printer.py", line 1922, 
in main
    mainwindow = GUI()
  File "/usr/share/system-config-printer/system-config-printer.py", line 42, 
in __init__
    self.language, self.encoding = locale.getlocale(locale.LC_ALL)
  File "/usr/lib/python2.4/locale.py", line 364, in getlocale
    raise TypeError, 'category LC_ALL is not supported'
TypeError: category LC_ALL is not supported

Comment 1 Tim Waugh 2006-05-25 12:21:01 UTC
Fixed in CVS.

Comment 2 Anton Guda 2006-05-26 15:31:28 UTC
Tested system-config-printer-0.7.9-1 :OK
Bug may be closed.



Comment 3 Tim Waugh 2006-05-26 15:53:03 UTC
The actual trigger is that one LC_... variable is different to another LC_...
variable.  In that case, trying to getlocale(LC_ALL) can't return a sensible answer.

0.7.9 is still afflicted with this; try:

LC_MESSAGES=fr_FR.UTF-8 LC_CTYPE=en_GB.UTF-8 system-config-printer

However, system-config-printer-0.7.10-1 should now handle this correctly.