Mercurial > libervia-desktop-kivy
comparison cagou/core/cagou_main.py @ 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 |
comparison
equal
deleted
inserted
replaced
316:86566968837a | 317:4b0fa73caad4 |
---|---|
488 if bridge_name == "pb" and sys.platform == "android": | 488 if bridge_name == "pb" and sys.platform == "android": |
489 try: | 489 try: |
490 self.retried += 1 | 490 self.retried += 1 |
491 except AttributeError: | 491 except AttributeError: |
492 self.retried = 1 | 492 self.retried = 1 |
493 from twisted.internet.error import ConnectionRefusedError | 493 if ((isinstance(failure, exceptions.BridgeExceptionNoService) |
494 if failure.check(ConnectionRefusedError) and self.retried < 100: | 494 and self.retried < 100)): |
495 if self.retried % 20 == 0: | 495 if self.retried % 20 == 0: |
496 log.debug("backend not ready, retrying ({})".format(self.retried)) | 496 log.debug("backend not ready, retrying ({})".format(self.retried)) |
497 Clock.schedule_once(lambda __: self.connectBridge(), 0.05) | 497 Clock.schedule_once(lambda __: self.connectBridge(), 0.05) |
498 return | 498 return |
499 super(Cagou, self)._bridgeEb(failure) | 499 super(Cagou, self)._bridgeEb(failure) |