diff options
author | Milas Bowman <milas.bowman@docker.com> | 2022-07-29 15:56:01 -0400 |
---|---|---|
committer | Milas Bowman <milas.bowman@docker.com> | 2022-07-29 15:56:01 -0400 |
commit | c6c2bbdcda6ebfc6afae55fd696fb83bcd8ebdf5 (patch) | |
tree | f5123e74d200bb0f22b9a8b193e7e52514850bd1 /docker/context/config.py | |
parent | bf1a3518f92eb845d1e39c8c18d9ee137f896c32 (diff) | |
parent | 73421027be04c97fc6f50da0647ba47388ed60e5 (diff) | |
download | docker-py-c6c2bbdcda6ebfc6afae55fd696fb83bcd8ebdf5.tar.gz |
Merge remote-tracking branch 'upstream/main' into HEAD
Diffstat (limited to 'docker/context/config.py')
-rw-r--r-- | docker/context/config.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docker/context/config.py b/docker/context/config.py index baf54f7..d761aef 100644 --- a/docker/context/config.py +++ b/docker/context/config.py @@ -15,7 +15,7 @@ def get_current_context_name(): docker_cfg_path = find_config_file() if docker_cfg_path: try: - with open(docker_cfg_path, "r") as f: + with open(docker_cfg_path) as f: name = json.load(f).get("currentContext", "default") except Exception: return "default" @@ -29,7 +29,7 @@ def write_context_name_to_docker_config(name=None): config = {} if docker_cfg_path: try: - with open(docker_cfg_path, "r") as f: + with open(docker_cfg_path) as f: config = json.load(f) except Exception as e: return e |