Skip to content

Commit

Permalink
Fix for python2 missing fallback option in config
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill888 committed Feb 9, 2018
1 parent 1045c8a commit 3328200
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datacube/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def __init__(self, config, files_loaded=None, env=None):

if env is None:
env = os.environ.get('DATACUBE_ENVIRONMENT',
config.get('user', 'default_environment', fallback=None))
(config.get('user', 'default_environment')
if config.has_option('user', 'default_environment') else None))

# If the user specifies a particular env, we either want to use it or Fail
if env:
Expand Down

0 comments on commit 3328200

Please sign in to comment.