From ccbde11c8dbb8773aed84abac92c6361b8e11229 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Tue, 30 Jan 2018 18:22:41 -0800 Subject: Improve separation between auth_configs and general_configs Signed-off-by: Joffrey F --- docker/utils/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docker/utils/config.py') 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 {} -- cgit v1.2.1