Fix deprecation warning around yaml.load

One test case calls yaml.load without specifying a loader. This
producing a deprecation warning [1]. Fix this by switching to
yaml.safe_load.

[1] https://msg.pyyaml.org/load

Change-Id: Ia6ef5b85e4dbb581cb6529af9c93424ae4c81ca5
This commit is contained in:
Tobias Henkel
2019-03-19 20:39:27 +01:00
parent fa0715eeac
commit 4a7894bc96

View File

@@ -61,7 +61,7 @@ class TestGitDriver(ZuulTestCase):
# Update zuul.yaml to force a tenant reconfiguration
path = os.path.join(self.upstream_root, 'common-config', 'zuul.yaml')
config = yaml.load(open(path, 'r').read())
config = yaml.safe_load(open(path, 'r').read())
change = {
'name': 'org/project',
'check': {