Bug 870770 - [locale.setlocale] name of unsupported locale not reported in exception message
Summary: [locale.setlocale] name of unsupported locale not reported in exception message
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bohuslav "Slavek" Kabrda
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-28 16:07 UTC by Steve Tyler
Modified: 2015-02-17 14:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 14:32:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steve Tyler 2012-10-28 16:07:33 UTC
Description of problem:

After an "unsupported locale setting" exception in locale.setlocale(), the name of the unsupported locale is not reported in the exception message:

>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'foo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/locale.py", line 539, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Version-Release number of selected component (if applicable):
python-2.7.3-7.2.fc17.x86_64
glibc-common-2.15-57.fc17.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. See above.
  
Actual results:
locale.Error: unsupported locale setting

Expected results:
Name of unsupported locale is reported in exception message:
locale.Error: unsupported locale setting 'foo'

Additional info:

Comment 1 Steve Tyler 2012-10-28 16:21:41 UTC
These bug report summaries would be more informative if they included the unsupported locale string:

Bug 863914 - [abrt] system-config-date-1.9.67-3.fc18: locale.py:539:setlocale:Error: unsupported locale setting 
Bug 862978 - Error: unsupported locale setting
Bug 841036 - [abrt] system-config-firewall-1.2.29-7.fc17: locale.py:539:setlocale:Error: unsupported locale setting 
Bug 784773 - [abrt] gnome-lirc-properties-0.5.1-3.fc15: locale.py:531:setlocale:Error: unsupported locale setting 
Bug 770412 - [abrt] system-config-firewall-1.2.29-4.fc16: locale.py:531:setlocale:Error: unsupported locale setting

Comment 2 Fedora Admin XMLRPC Client 2013-05-10 05:07:49 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora Admin XMLRPC Client 2013-05-10 05:07:52 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2013-05-10 05:10:26 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora End Of Life 2013-07-03 20:15:49 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Steve Tyler 2013-07-03 20:35:17 UTC
(In reply to Fedora End Of Life from comment #5)
> This message is a reminder that Fedora 17 is nearing its end of life.
...

With F19, the unsupported locale is not reported in the exception message.

Changing version to F19:
python-2.7.5-1.fc19.x86_64
glibc-common-2.17-11.fc19.x86_64

Comment 7 Fedora End Of Life 2015-01-09 17:26:45 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2015-02-17 14:32:11 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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