# HG changeset patch # User Goffi # Date 1535731686 -7200 # Node ID 7cd89277a129c818e3415f50b4742f8d5f773ebc # Parent 56ace2d45783dad9ba6433456041f9789804147c server: fixed missing backend detection diff -r 56ace2d45783 -r 7cd89277a129 libervia/server/server.py --- a/libervia/server/server.py Fri Aug 31 18:05:15 2018 +0200 +++ b/libervia/server/server.py Fri Aug 31 18:08:06 2018 +0200 @@ -1635,11 +1635,7 @@ self.ns_map = {} # map of short name to namespaces ## bridge ## - try: - self.bridge = Bridge() - except BridgeExceptionNoService: - print(u"Can't connect to SàT backend, are you sure it's launched ?") - sys.exit(1) + self.bridge = Bridge() self.bridge.bridgeConnect(callback=self._bridgeCb, errback=self._bridgeEb) def _namespacesGetCb(self, ns_map): @@ -1788,8 +1784,12 @@ self.initialised.addCallback(self.backendReady) self.initialised.addErrback(self.initEb) - def _bridgeEb(self, failure): - log.error(u"Can't connect to bridge: {}".format(failure)) + def _bridgeEb(self, failure_): + if isinstance(failure_, BridgeExceptionNoService): + print(u"Can't connect to SàT backend, are you sure it's launched ?") + else: + log.error(u"Can't connect to bridge: {}".format(failure)) + sys.exit(1) @property def version(self):