Skip to content
Snippets Groups Projects
Commit ba5b8b55 authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Fix for 07263c3a

parent d99681e5
No related branches found
No related tags found
No related merge requests found
...@@ -213,7 +213,10 @@ class FlamencoWorker: ...@@ -213,7 +213,10 @@ class FlamencoWorker:
resp = await self.manager.post(url, **post_kwargs) resp = await self.manager.post(url, **post_kwargs)
resp.raise_for_status() resp.raise_for_status()
except requests.RequestException as ex: except requests.RequestException as ex:
if not may_retry_loop or (ex.response and ex.response.status_code == 401): # Somehow 'ex.response is not None' is really necessary; just 'ex.response'
# is not working as expected.
is_unauthorized = ex.response is not None and ex.response.status_code == 401
if not may_retry_loop or is_unauthorized:
self._log.debug('Unable to POST to manager %s: %s', url, ex) self._log.debug('Unable to POST to manager %s: %s', url, ex)
raise raise
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment