mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-11 10:54:02 -07:00
vultr: fix for API returned unexpected empty list (#48036)
* vultr: fix for API returned unexpected empty list * add changelog
This commit is contained in:
parent
435e764fb3
commit
788247583b
3 changed files with 19 additions and 1 deletions
|
@ -201,7 +201,7 @@ class Vultr:
|
|||
return {}
|
||||
|
||||
try:
|
||||
return self.module.from_json(to_text(res))
|
||||
return self.module.from_json(to_native(res)) or {}
|
||||
except ValueError as e:
|
||||
self.module.fail_json(msg="Could not process response into json: %s" % e)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue