From 21757150f6a65b8ed315681aba1178b72cae1722 Mon Sep 17 00:00:00 2001 From: calvin Date: Mon, 28 Mar 2005 23:52:46 +0000 Subject: [PATCH] workaround for buggy l18n algorithm git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2464 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/i18n.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linkcheck/i18n.py b/linkcheck/i18n.py index 2e2385b4..85769a2b 100644 --- a/linkcheck/i18n.py +++ b/linkcheck/i18n.py @@ -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)