Use pyyaml safe_load to avoid deprecation warning

yaml.load without a Loader is deprecated in pyyaml 5.1 [1]
so this change switches to use safe_load.

[1] https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

Change-Id: I7fdda49d27732ae35c468e7f52adf1032d64a441
This commit is contained in:
Matt Riedemann 2019-04-22 09:26:42 -04:00
parent 754fdeae04
commit 562187cf85
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ def load(directory='queries'):
data = []
for fname in bugs:
bugnum = os.path.basename(fname).rstrip('.yaml')
query = yaml.load(open(fname).read())
query = yaml.safe_load(open(fname).read())
query['bug'] = bugnum
# By default we filter out non-voting jobs, but in certain cases we
# want to show failures for non-voting jobs in the graph while we