1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix "TypeError: Object of type map is not JSON serializable" (#223)

Fix TypeError for manageiq_provider module.
This commit is contained in:
kenchrcum 2020-04-24 07:56:12 +02:00 committed by GitHub
parent 546acdaac7
commit 81bf52047a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- manageiq_provider - fix serialization error when running on python3 environment.

View file

@ -571,7 +571,7 @@ def delete_nulls(h):
a hash without nulls
"""
if isinstance(h, list):
return map(delete_nulls, h)
return [delete_nulls(i) for i in h]
if isinstance(h, dict):
return dict((k, delete_nulls(v)) for k, v in h.items() if v is not None)