From 3328200b62a74a42b85a5d4aa20c759ee367db81 Mon Sep 17 00:00:00 2001 From: Kirill Kouzoubov Date: Fri, 9 Feb 2018 13:38:04 +1100 Subject: [PATCH] Fix for python2 missing `fallback` option in config --- datacube/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datacube/config.py b/datacube/config.py index 0d7b2e983a..e1598d4c54 100755 --- a/datacube/config.py +++ b/datacube/config.py @@ -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: