mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-28 07:43:59 +00:00
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:
parent
642e2d1698
commit
21757150f6
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue