fix "TypeError: Object of type map is not JSON serializable" (#223)
Fix TypeError for manageiq_provider module.pull/301/head
parent
546acdaac7
commit
81bf52047a
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- manageiq_provider - fix serialization error when running on python3 environment.
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue