Fix yaml safe_load and allow unittests on py35

* Change yaml.load() -> yaml.safe_load()
 * Pin cffi to 1.14.6 for py35

Change-Id: I623ce5f636e36a121d22763e591d618d26db4b07
This commit is contained in:
Alex Kavanagh 2021-10-14 14:30:47 +01:00
parent fb8ed49ae4
commit f6cd0d6bf3
2 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,7 @@ def get_action_parser(actions_yaml_path, action_name,
get_services=services):
"""Make an argparse.ArgumentParser seeded from actions.yaml definitions."""
with open(actions_yaml_path) as fh:
doc = yaml.load(fh)[action_name]["description"]
doc = yaml.safe_load(fh)[action_name]["description"]
parser = argparse.ArgumentParser(description=doc)
parser.add_argument("--services", default=get_services())
# TODO: Add arguments for params defined in the actions.yaml

View File

@ -7,6 +7,7 @@
# requirements. They are intertwined. Also, Zaza itself should specify
# all of its own requirements and if it doesn't, fix it there.
#
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
requests>=2.18.4