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

Proposed by Lionel Dricot on 2009-04-03
Status: Merged
Merged at revision: 208
Proposed branch: lp:~ploum/pyroom/locale_fallback
Merge into: lp:pyroom
Diff against target: None lines
To merge this branch: bzr merge lp:~ploum/pyroom/locale_fallback
Reviewer Review Type Date Requested Status
Adam Rooke 2009-04-03 Approve on 2010-08-20
Review via email: mp+5194@code.launchpad.net
To post a comment you must log in.
Lionel Dricot (ploum) 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.

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 status/vote changes: