HomeClusterLabs Projects

fence_vmware_rest: improve exception handling in send_command()

Description

fence_vmware_rest: 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, a exception will occur accessing result which will not
raise the intended exception.

Details

Provenance
Thomas Abraham <tabraham@suse.com>Authored on Apr 20 2020, 8:28 PM
Parents
rFebbe3c5d0bc8: Merge pull request #326 from arbulu89/hotfix/fence-gce-discovery-false
Branches
Unknown
Tags
Unknown

Event Timeline