From 5a9b5579db1d4ca825873cbb61515d261a2b7178 Mon Sep 17 00:00:00 2001 From: chetom Date: Wed, 28 Jun 2023 16:06:28 +0200 Subject: [PATCH] Fix_logout_issue Changes to be committed: modified: hpe3parclient/http.py Fixed issue: Signout from expired WSAPI session throws an exception: - invalid session key --- hpe3parclient/http.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hpe3parclient/http.py b/hpe3parclient/http.py index 138a97f9..2fc77a77 100644 --- a/hpe3parclient/http.py +++ b/hpe3parclient/http.py @@ -304,6 +304,8 @@ def _do_reauth(self, url, method, ex, **kwargs): try: if self.auth_try != 1: self._reauth() + if method == 'DELETE' and url.startswith('/credentials/'): + url = '/credentials/%s' % self.session_key resp, body = self._time_request(self.api_url + url, method, **kwargs) return resp, body