diff options
author | Joffrey F <joffrey@docker.com> | 2018-01-30 18:22:41 -0800 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2018-01-30 18:42:38 -0800 |
commit | ccbde11c8dbb8773aed84abac92c6361b8e11229 (patch) | |
tree | 8bf4e02458dded8990a80a8e6bdcb3a1cdea3532 /docker/utils/config.py | |
parent | 75e2e8ad816ac35e1c4928f6b3f9e40841ca493c (diff) | |
download | docker-py-improve_authconfig_genconfig_separation.tar.gz |
Improve separation between auth_configs and general_configsimprove_authconfig_genconfig_separation
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'docker/utils/config.py')
-rw-r--r-- | docker/utils/config.py | 5 |
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 {} |