mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
fix duplicate exception sanity error
This commit is contained in:
parent
c87c0aa712
commit
48f10669d6
@ -404,7 +404,7 @@ def main():
|
||||
result = credential.delete(**params)
|
||||
except (exc.NotFound) as excinfo:
|
||||
module.fail_json(msg='Failed to update credential, organization not found: {0}'.format(excinfo), changed=False)
|
||||
except (exc.ConnectionError, exc.BadRequest, exc.NotFound, exc.AuthError) as excinfo:
|
||||
except (exc.ConnectionError, exc.BadRequest, exc.AuthError) as excinfo:
|
||||
module.fail_json(msg='Failed to update credential: {0}'.format(excinfo), changed=False)
|
||||
|
||||
json_output['changed'] = result['changed']
|
||||
|
||||
@ -179,7 +179,7 @@ def main():
|
||||
result = group.delete(**params)
|
||||
except (exc.NotFound) as excinfo:
|
||||
module.fail_json(msg='Failed to update the group, inventory not found: {0}'.format(excinfo), changed=False)
|
||||
except (exc.ConnectionError, exc.BadRequest, exc.NotFound, exc.AuthError) as excinfo:
|
||||
except (exc.ConnectionError, exc.BadRequest, exc.AuthError) as excinfo:
|
||||
module.fail_json(msg='Failed to update the group: {0}'.format(excinfo), changed=False)
|
||||
|
||||
json_output['changed'] = result['changed']
|
||||
|
||||
@ -94,7 +94,7 @@ def main():
|
||||
result = label.delete(name=name, organization=org['id'])
|
||||
except (exc.NotFound) as excinfo:
|
||||
module.fail_json(msg='Failed to update label, organization not found: {0}'.format(excinfo), changed=False)
|
||||
except (exc.ConnectionError, exc.BadRequest, exc.NotFound, exc.AuthError) as excinfo:
|
||||
except (exc.ConnectionError, exc.BadRequest, exc.AuthError) as excinfo:
|
||||
module.fail_json(msg='Failed to update label: {0}'.format(excinfo), changed=False)
|
||||
|
||||
json_output['changed'] = result['changed']
|
||||
|
||||
@ -103,7 +103,7 @@ def main():
|
||||
result = team.delete(name=name, organization=org['id'])
|
||||
except (exc.NotFound) as excinfo:
|
||||
module.fail_json(msg='Failed to update team, organization not found: {0}'.format(excinfo), changed=False)
|
||||
except (exc.ConnectionError, exc.BadRequest, exc.NotFound, exc.AuthError) as excinfo:
|
||||
except (exc.ConnectionError, exc.BadRequest, exc.AuthError) as excinfo:
|
||||
module.fail_json(msg='Failed to update team: {0}'.format(excinfo), changed=False)
|
||||
|
||||
json_output['changed'] = result['changed']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user