HomeClusterLabs Projects

fence_vmware_cloud: improve exception handling in send_command()

Description

fence_vmware_cloud: improve exception handling in send_command()

If an exception occurs, simply raise it. pycurl's perform() method
can generate a pycurl.error object, which does not support indexing and
attempting to do so will generate an exception that hides the original
exception.

Also, don't assume that the remote will return a JSON formatted response.
If it doesn't, an exception will occur accessing result, which will not
raise the intended exception.

Details

Provenance
Thomas Abraham <tabraham@suse.com>Authored on Apr 22 2020, 10:17 AM
Parents
rF020f48a309bc: fence_vmware_rest: improve exception handling in send_command()
Branches
Unknown
Tags
Unknown

Event Timeline