Protection from crashing on a bad lang name
svn: r14312
This commit is contained in:
parent
36281cc5e4
commit
2e038d405e
@ -1821,7 +1821,10 @@ def get_relationship_calculator(reinit=False):
|
||||
lang = locale.getlocale()[0]
|
||||
if not lang:
|
||||
# if lang is empty/None
|
||||
lang = locale.getdefaultlocale()[0]
|
||||
try:
|
||||
lang = locale.getdefaultlocale()[0]
|
||||
except:
|
||||
pass
|
||||
for plugin in PluginRegister.get_instance().relcalc_plugins():
|
||||
if lang in plugin.lang_list:
|
||||
pmgr = BasePluginManager.get_instance()
|
||||
|
Loading…
Reference in New Issue
Block a user