Merge pull request #959 from resmo/for-ansible

cloudstack: fix templates not always have checksums
This commit is contained in:
Brian Coca 2015-09-11 11:17:49 -04:00
commit ea1bd0b078

View file

@ -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