changeset 72:1a324c682d8a

core: use onBridgeConnected and exit code 3 when bridge can't be imported
author Goffi <goffi@goffi.org>
date Sun, 18 Dec 2016 21:01:04 +0100
parents 8c9fe2c5aacc
children 674b1fa3c945
files src/cagou/core/cagou_main.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/cagou/core/cagou_main.py	Sun Dec 18 16:31:23 2016 +0100
+++ b/src/cagou/core/cagou_main.py	Sun Dec 18 21:01:04 2016 +0100
@@ -249,9 +249,9 @@
         bridge_module = dynamic_import.bridge(bridge_name, 'sat_frontends.bridge')
         if bridge_module is None:
             log.error(u"Can't import {} bridge".format(bridge_name))
-            sys.exit(1)
+            sys.exit(3)
         else:
-            log.info(u"Loading {} bridge".format(bridge_name))
+            log.debug(u"Loading {} bridge".format(bridge_name))
         super(Cagou, self).__init__(bridge_factory=bridge_module.Bridge, xmlui=xmlui, check_options=quick_utils.check_options, connect_bridge=False)
         self._import_kv()
         self.app = CagouApp()
@@ -268,8 +268,7 @@
             for w in w_list:
                 yield w
 
-    def _bridgeCb(self):
-        super(Cagou, self)._bridgeCb()
+    def onBridgeConnected(self):
         self.bridge.getReady(self.onBackendReady)
 
     def _bridgeEb(self, failure):