Skip to content
Snippets Groups Projects
Unverified Commit b46e7515 authored by rptaylor's avatar rptaylor Committed by GitHub
Browse files

protect against TypeError in case of NoneType (#7659)

parent 6a2ea94b
No related branches found
No related tags found
No related merge requests found
...@@ -323,11 +323,11 @@ def openstack_host(resource, module_name): ...@@ -323,11 +323,11 @@ def openstack_host(resource, module_name):
}) })
# add groups based on attrs # add groups based on attrs
groups.append('os_image=' + attrs['image']['id']) groups.append('os_image=' + str(attrs['image']['id']))
groups.append('os_flavor=' + attrs['flavor']['name']) groups.append('os_flavor=' + str(attrs['flavor']['name']))
groups.extend('os_metadata_%s=%s' % item groups.extend('os_metadata_%s=%s' % item
for item in list(attrs['metadata'].items())) for item in list(attrs['metadata'].items()))
groups.append('os_region=' + attrs['region']) groups.append('os_region=' + str(attrs['region']))
# groups specific to kubespray # groups specific to kubespray
for group in attrs['metadata'].get('kubespray_groups', "").split(","): for group in attrs['metadata'].get('kubespray_groups', "").split(","):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment