Skip to content

Commit d3bd219

Browse files
author
Matthew Fisher
committed
fix(client): skip logout if connection fails
Logout should never really fail - if the controller is inaccessible, we should make sure we're deleting the cookies and then return.
1 parent bfa0594 commit d3bd219

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

client/deis.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,10 @@ def auth_logout(self, args):
773773
"""
774774
controller = self._settings.get('controller')
775775
if controller:
776-
self._dispatch('get', '/api/auth/logout/')
776+
try:
777+
self._dispatch('get', '/api/auth/logout/')
778+
except requests.exceptions.ConnectionError:
779+
pass
777780
self._session.cookies.clear()
778781
self._session.cookies.save()
779782
self._settings['controller'] = None

0 commit comments

Comments
 (0)