I18n utils: fix broken case when 'settings' argument is default NULL one.
This commit is contained in:
@@ -601,8 +601,11 @@ class I18nSettings:
|
|||||||
return json.dumps(export_dict)
|
return json.dumps(export_dict)
|
||||||
|
|
||||||
def load(self, fname, reset=False):
|
def load(self, fname, reset=False):
|
||||||
|
reset = reset or fname is None
|
||||||
if reset:
|
if reset:
|
||||||
self.__dict__ = {uid: data for uid, data in globals().items() if not uid.startswith("_")}
|
self.__dict__ = {uid: data for uid, data in globals().items() if not uid.startswith("_")}
|
||||||
|
if fname is None:
|
||||||
|
return
|
||||||
if isinstance(fname, str):
|
if isinstance(fname, str):
|
||||||
if not os.path.isfile(fname):
|
if not os.path.isfile(fname):
|
||||||
# Assume it is already real JSon string...
|
# Assume it is already real JSon string...
|
||||||
|
|||||||
Reference in New Issue
Block a user