mirror of
https://github.com/jazzband/dj-database-url.git
synced 2026-03-16 22:20:24 +00:00
Merge pull request #5 from ghickman/master
Swap out an if block for get() on os.environ.
This commit is contained in:
commit
47ade69fbc
1 changed files with 1 additions and 4 deletions
|
|
@ -15,10 +15,7 @@ def config(env=DEFAULT_ENV, default=None):
|
|||
|
||||
config = {}
|
||||
|
||||
if env in os.environ:
|
||||
s = os.environ[env]
|
||||
else:
|
||||
s = default
|
||||
s = os.environ.get(env, default)
|
||||
|
||||
if s:
|
||||
config = parse(s)
|
||||
|
|
|
|||
Loading…
Reference in a new issue