nodepool elements: use yaml.safe_load
The recent pyyaml 6 release, incorporated in the latest nodepool-builder/dib images, requires a specific loader now. Use safe_load as there's nothing crazy going on here. Change-Id: I26e5e1cf6778cb51872d6a65b2ac683335201bb4
This commit is contained in:
parent
84dd6f75c9
commit
04b3eb3d43
@ -42,7 +42,7 @@ CUSTOM_PROJECTS_LIST_URL = os.environ.get('DIB_CUSTOM_PROJECTS_LIST_URL')
|
|||||||
def get_project_list(url):
|
def get_project_list(url):
|
||||||
try:
|
try:
|
||||||
projects = []
|
projects = []
|
||||||
for f in yaml.load(urlopen(url)):
|
for f in yaml.safe_load(urlopen(url)):
|
||||||
# Skip repos that are inactive
|
# Skip repos that are inactive
|
||||||
project = f['project']
|
project = f['project']
|
||||||
dirname = os.path.dirname(project)
|
dirname = os.path.dirname(project)
|
||||||
|
Loading…
Reference in New Issue
Block a user