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

Fix fatal exception when unable to connect to Manager

parent c176da19
No related branches found
No related tags found
No related merge requests found
...@@ -213,7 +213,7 @@ class FlamencoWorker: ...@@ -213,7 +213,7 @@ 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.status_code == 401: if not may_retry_loop or (ex.response and ex.response.status_code == 401):
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