Merge pull request #959 from resmo/for-ansible
cloudstack: fix templates not always have checksums
This commit is contained in:
commit
ea1bd0b078
1 changed files with 1 additions and 1 deletions
|
@ -501,7 +501,7 @@ class AnsibleCloudStackTemplate(AnsibleCloudStack):
|
||||||
return templates['template'][0]
|
return templates['template'][0]
|
||||||
else:
|
else:
|
||||||
for i in templates['template']:
|
for i in templates['template']:
|
||||||
if i['checksum'] == checksum:
|
if 'checksum' in i and i['checksum'] == checksum:
|
||||||
return i
|
return i
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue