Fixed PEB8 warning about initialization and comparison to None

This commit is contained in:
Wojciech Bartosiak 2016-02-15 19:42:08 +00:00
parent adb977abbb
commit c0f79a196d

View file

@ -126,11 +126,12 @@ def get(name, import_str=False):
"""
Helper function to use inside the package.
"""
value = None
try:
value = getattr(default_settings, name)
value = getattr(settings, name)
except AttributeError:
if value == None:
if value is None:
raise Exception('You must set ' + name + ' in your settings.')
value = import_from_str(value) if import_str else value