Merge pull request #80 from wojtek-fliposports/v0.2.x

Fixed PEB8 warning about initialization and comparison to None.
This commit is contained in:
Juan Ignacio Fiorentino 2016-02-15 16:46:26 -03:00
commit 58482a6585

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