summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Sill <alan.sill@ttu.edu>2021-08-05 10:45:03 -0500
committerGitHub <noreply@github.com>2021-08-05 17:45:03 +0200
commit976d5cdc22f812ebe6b1b747ab0018b7fbfc712f (patch)
tree49acdcf8a130dd08dc7c06f1f6a6ee4eebccc794
parentc822d447616100cc189b95d78cc138005d0b6368 (diff)
Update yaml.load call in cli.py to use SafeLoader (#151)
* Update yaml.load call to use SafeLoader for compatibility with latest PyYAML version recommendations Co-authored-by: Mickaƫl Schoentgen <contact@tiger-222.fr>
-rw-r--r--http_prompt/cli.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/http_prompt/cli.py b/http_prompt/cli.py
index 821fcc4..b5d52a9 100644
--- a/http_prompt/cli.py
+++ b/http_prompt/cli.py
@@ -116,7 +116,7 @@ def cli(spec, env, url, http_options):
spec = json.loads(content)
except json.JSONDecodeError:
try:
- spec = yaml.load(content)
+ spec = yaml.safe_load(content)
except yaml.YAMLError:
click.secho("Warning: Specification file '%s' is neither valid JSON nor YAML" %
spec, err=True, fg='red')