Skip to content

Proper Error Handling Missing at client initialization #47

@sonivi

Description

@sonivi

https://github.com/hpe-storage/python-3parclient/blob/master/hpe3parclient/client.py#L201-L204
try: api_version = self.getWsApiVersion() except exceptions as ex: ex_desc = ex.get_description()

error at "self.getWsApiVersion()" results in

11:23:49 E   requests.exceptions.ProxyError: HTTPSConnectionPool(host='192.168.67.2', port=8080): Max retries exceeded with url: /api (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Service Unavailable',)))
11:23:49 
11:23:49 During handling of the above exception, another exception occurred:
11:23:49 hpe_3par_api_manage_test.py:48: in <module>
11:23:49     hpe_3par_cli = HPE3ParClient(HPE3PAR_API_URL, True, False, None, True)
11:23:49 /usr/lib/python3.6/site-packages/hpe3parclient/client.py:203: in __init__
11:23:49     except exceptions as ex:
11:23:49 E   TypeError: catching classes that do not inherit from BaseException is not allowed
11:23:49 ------------------------------- Captured stderr --------------------------------
11:23:49 
11:23:49 REQ: curl -i https://192.168.67.2:8080/api -X GET -H "User-Agent: python-3parclient" -H "Accept: application/json"
11:23:49 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions