From fe4116d1178c2398b5b822e7393fdd256acb8ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=99=9A=E5=A4=A7=E9=AD=94=E7=8E=8B?= Date: Mon, 11 May 2020 11:00:26 +0800 Subject: [PATCH] fix: use yaml.SafeLoader for yaml.load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 小虚大魔王 --- kubeshell/kubeshell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubeshell/kubeshell.py b/kubeshell/kubeshell.py index 7bbc8f2..f631406 100644 --- a/kubeshell/kubeshell.py +++ b/kubeshell/kubeshell.py @@ -39,7 +39,7 @@ def parse_kubeconfig(): return ("", "", "") with open(os.path.expanduser(kubeconfig_filepath), "r") as fd: - docs = yaml.load_all(fd) + docs = yaml.load_all(fd, Loader=yaml.SafeLoader) for doc in docs: current_context = doc.get("current-context", "") contexts = doc.get("contexts")