From 56e29c162bd6beb705458a93551781c9e65328c9 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 11 Mar 2013 22:43:52 +0000 Subject: [PATCH] GrampsLocale: Protect another setlocale instance svn: r21612 --- 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 8f4a794e3..a4df7cb73 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