cloudstack: cs_cluster: remove duplicate code error handling (#27261)
This commit is contained in:
parent
495f91158c
commit
b3e8fa72ce
1 changed files with 1 additions and 2 deletions
|
@ -335,8 +335,7 @@ class AnsibleCloudStackCluster(AnsibleCloudStack):
|
|||
cluster = None
|
||||
if not self.module.check_mode:
|
||||
res = self.query_api('addCluster', **args)
|
||||
if 'errortext' in res:
|
||||
self.module.fail_json(msg="Failed: '%s'" % res['errortext'])
|
||||
|
||||
# API returns a list as result CLOUDSTACK-9205
|
||||
if isinstance(res['cluster'], list):
|
||||
cluster = res['cluster'][0]
|
||||
|
|
Loading…
Reference in a new issue