diff --git a/package/cloudshell/cp/vcenter/common/utilites/command_result.py b/package/cloudshell/cp/vcenter/common/utilites/command_result.py index 0dc5155e..1b63730e 100644 --- a/package/cloudshell/cp/vcenter/common/utilites/command_result.py +++ b/package/cloudshell/cp/vcenter/common/utilites/command_result.py @@ -22,6 +22,10 @@ def set_command_result(result, unpicklable=False): :param unpicklable: If True adds JSON can be deserialized as real object. When False will be deserialized as dictionary """ + # we do not need to serialize an empty response from the vCenter + if result is None: + return + json = jsonpickle.encode(result, unpicklable=unpicklable) result_for_output = str(json) print result_for_output