Merge lp:~ploum-deactivatedaccount/pyroom/locale_fallback into lp:pyroom

Proposed by Lionel Dricot
Status: Merged
Merged at revision: 208
Proposed branch: lp:~ploum-deactivatedaccount/pyroom/locale_fallback
Merge into: lp:pyroom
Diff against target: None lines
To merge this branch: bzr merge lp:~ploum-deactivatedaccount/pyroom/locale_fallback
Reviewer Review Type Date Requested Status
Adam Rooke Approve
Review via email: mp+5194@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

If, for any reason, your $LANG is set to an unsupported locale, PyRoom will crash. This patch solve that crash and fallback to locale('C') in that case.

Revision history for this message
Adam Rooke (abelianr) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'PyRoom/__init__.py'
2--- PyRoom/__init__.py 2009-03-26 13:07:49 +0000
3+++ PyRoom/__init__.py 2009-04-03 11:53:47 +0000
4@@ -2,7 +2,10 @@
5
6 __VERSION__ = '0.4.1'
7 import locale
8-locale.setlocale(locale.LC_ALL, '')
9+try :
10+ locale.setlocale(locale.LC_ALL, '')
11+except :
12+ locale.setlocale(locale.LC_ALL, 'C')
13
14 import gettext
15 import gtk

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: