Merge pull request #80 from wojtek-fliposports/v0.2.x
Fixed PEB8 warning about initialization and comparison to None.
This commit is contained in:
commit
58482a6585
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue