mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 01:44:03 -07:00
docker_*: always use client.fail() over module.fail_json(), allow to always return data on failure (#51999)
* Always use client.fail() instead of module.fail_json(). * Allow to pass on results on module failure. * Linting.
This commit is contained in:
parent
ad386290b4
commit
d7fd4d0550
12 changed files with 64 additions and 60 deletions
|
@ -95,7 +95,7 @@ def get_existing_volume(client, volume_name):
|
|||
except NotFound as dummy:
|
||||
return None
|
||||
except Exception as exc:
|
||||
client.module.fail_json(msg="Error inspecting volume: %s" % exc)
|
||||
client.fail("Error inspecting volume: %s" % exc)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue