From eba70e9fac85c73bb161d12e55913b7393427353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Sat, 10 Dec 2005 21:11:31 +0000 Subject: [PATCH] * when locale is not set (C locale) we use en locale --- pisi/pxml/autoxml.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pisi/pxml/autoxml.py b/pisi/pxml/autoxml.py index 33e2a2c0..56b656ac 100644 --- a/pisi/pxml/autoxml.py +++ b/pisi/pxml/autoxml.py @@ -113,7 +113,10 @@ class LocalText(dict): (lang, encoding) = locale.getlocale() if not lang: (lang, encoding) = locale.getdefaultlocale() - return lang[0:2] + if lang==None: # stupid python means it is C locale + return 'en' + else: + return lang[0:2] except: raise Error(_('LocalText: unable to get either current or default locale'))