[r21612]GrampsLocale: Protect another setlocale instance

svn: r21617
This commit is contained in:
John Ralls 2013-03-11 22:54:11 +00:00
parent 2ebec70e21
commit 3490ebc684

View File

@ -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