diff options
author | Daniel Axtens <dja@axtens.net> | 2019-03-15 17:27:40 +1100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2019-03-21 13:20:30 +0000 |
commit | a4698b2eddd3978aa0ee85e6740c5b4381fc4d76 (patch) | |
tree | 04ee2264cfd8121ec90872475dbe27b319993e0e | |
parent | 53896af6275e58f49738c3892a5b4b6f38f30b70 (diff) | |
download | patchwork-a4698b2eddd3978aa0ee85e6740c5b4381fc4d76.tar patchwork-a4698b2eddd3978aa0ee85e6740c5b4381fc4d76.tar.gz |
Fix YAML loader warning
In my tests I'm seeing:
/home/patchwork/patchwork/patchwork/tests/api/validator.py:229:
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated,
as the default Loader is unsafe. Please read https://msg.pyyaml.org/load
for full details.
Fix this by using the safe loader in the tests.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
-rw-r--r-- | patchwork/tests/api/validator.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/patchwork/tests/api/validator.py b/patchwork/tests/api/validator.py index 3f13847..ad4d7f1 100644 --- a/patchwork/tests/api/validator.py +++ b/patchwork/tests/api/validator.py @@ -226,7 +226,7 @@ def _load_spec(version): 'patchwork.yaml') with open(spec_path, 'r') as fh: - data = yaml.load(fh) + data = yaml.load(fh, Loader=yaml.SafeLoader) _LOADED_SPECS[version] = openapi_core.create_spec(data) |