GrampsLocale: Protect another setlocale instance

svn: r21612
This commit is contained in:
John Ralls 2013-03-11 22:43:52 +00:00
parent 7055827260
commit 56e29c162b

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