summaryrefslogtreecommitdiff
path: root/docker/context/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/context/config.py')
-rw-r--r--docker/context/config.py4
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