Allow to redirect bus request

issue7943
review48691003
This commit is contained in:
Cédric Krier committed 2019-01-18 11:01:22 +01:00
1 parent b4ae7cb9ef
commit f3565724be
1 file changed
+7 -3
+7 -3
View File
@@ -64,9 +64,13 @@ def _listen(connection):
wait = 1
continue
except Exception as error:
if isinstance(error, HTTPError) and error.code == 501:
logger.info("Bus not supported")
break
if isinstance(error, HTTPError):
if error.code in (301, 302, 303, 307, 308):
url = error.headers.get('Location')
continue
elif error.code == 501:
logger.info("Bus not supported")
break
logger.error(
"An exception occured while connecting to the bus."
"Sleeping for %s seconds",