changeset 317:4b0fa73caad4

core: bridge are now raising generic BridgeExceptionNoService
author Goffi <goffi@goffi.org>
date Wed, 16 Oct 2019 08:50:34 +0200
parents 86566968837a
children 834d5c267219
files cagou/core/cagou_main.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/core/cagou_main.py	Wed Oct 16 08:48:32 2019 +0200
+++ b/cagou/core/cagou_main.py	Wed Oct 16 08:50:34 2019 +0200
@@ -490,8 +490,8 @@
                 self.retried += 1
             except AttributeError:
                 self.retried = 1
-            from twisted.internet.error import ConnectionRefusedError
-            if failure.check(ConnectionRefusedError) and self.retried < 100:
+            if ((isinstance(failure, exceptions.BridgeExceptionNoService)
+                 and self.retried < 100)):
                 if self.retried % 20 == 0:
                     log.debug("backend not ready, retrying ({})".format(self.retried))
                 Clock.schedule_once(lambda __: self.connectBridge(), 0.05)