Fixed bad try/except/finally block

This commit is contained in:
kaveh 2017-04-07 16:59:40 -07:00
parent 41003e1e83
commit 959c7a0929

View file

@ -175,13 +175,12 @@ def get(name, import_str=False):
except AttributeError:
if name in default_settings.required_attrs:
raise Exception('You must set ' + name + ' in your settings.')
finally:
if isinstance(default_value, dict) and value:
default_value.update(value)
value = default_value
if isinstance(default_value, dict) and value:
default_value.update(value)
value = default_value
else:
value = value or default_value
value = import_from_str(value) if import_str else value
value = import_from_str(value) if import_str else value
return value