From 3490ebc6845b50c511a08ebcbbb6ec864142ee45 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 11 Mar 2013 22:54:11 +0000 Subject: [PATCH] [r21612]GrampsLocale: Protect another setlocale instance svn: r21617 --- gramps/gen/utils/grampslocale.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py index 0fc23f438..9c3e17c78 100644 --- a/gramps/gen/utils/grampslocale.py +++ b/gramps/gen/utils/grampslocale.py @@ -163,7 +163,10 @@ class GrampsLocale(object): domain=None, language=None): #First, globally set the locale to what's in the environment: - locale.setlocale(locale.LC_ALL, '') + try: + locale.setlocale(locale.LC_ALL, '') + except locale.Error: + pass if localedir and os.path.exists(localedir): self.localedir = localedir