workaround for buggy l18n algorithm

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2464 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2005-03-28 23:52:46 +00:00
parent 642e2d1698
commit 21757150f6

View file

@ -142,7 +142,12 @@ def get_locale ():
"""
Return current configured locale.
"""
loc = locale.getdefaultlocale()[0]
loc = None
try:
loc = locale.getdefaultlocale()[0]
except ValueError:
# workaround (XXX delete this when python2.5 is fixed)
pass
if loc is None:
return 'C'
loc = locale.normalize(loc)