From 1eb93d5813d87105e4427a6b828b7ff61bb5d7a3 Mon Sep 17 00:00:00 2001 From: "Milkowski, Robert" Date: Fri, 20 Mar 2020 12:31:10 +0000 Subject: [PATCH] Fix exception handling when SSL certificate can't be verified. Without the fix FlashArray() call fails with: ... File ".../.venv/lib64/python3.6/site-packages/purestorage/purestorage.py", line 169, in _request raise PureError(err.message) AttributeError: 'SSLError' object has no attribute 'message' --- purestorage/purestorage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purestorage/purestorage.py b/purestorage/purestorage.py index fd61fce..78d6ef3 100644 --- a/purestorage/purestorage.py +++ b/purestorage/purestorage.py @@ -166,7 +166,7 @@ def _request(self, method, path, data=None, reestablish_session=True): except requests.exceptions.RequestException as err: # error outside scope of HTTP status codes # e.g. unable to resolve domain name - raise PureError(err.message) + raise PureError(err) if response.status_code == 200: if "application/json" in response.headers.get("Content-Type", ""):