summaryrefslogtreecommitdiff
path: root/docker/utils/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/utils/config.py')
-rw-r--r--docker/utils/config.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/docker/utils/config.py b/docker/utils/config.py
index 8417261..82a0e2a 100644
--- a/docker/utils/config.py
+++ b/docker/utils/config.py
@@ -57,9 +57,10 @@ def load_general_config(config_path=None):
try:
with open(config_file) as f:
return json.load(f)
- except Exception as e:
+ except (IOError, ValueError) as e:
+ # In the case of a legacy `.dockercfg` file, we won't
+ # be able to load any JSON data.
log.debug(e)
- pass
log.debug("All parsing attempts failed - returning empty config")
return {}