comparison sat_frontends/quick_frontend/quick_app.py @ 3490:509f7a1c67dc

frontends: use new EXIT_BACKEND_NOT_FOUND exit code: - new EXIT_BACKEND_NOT_FOUND (5) is used when frontend can't find backend with the bridge. It differs from EXIT_BRIDGE_ERROR (3) which is used when something went wrong when connecting to backend. - use this exit code in quick app and in jp
author Goffi <goffi@goffi.org>
date Tue, 23 Mar 2021 21:21:00 +0100
parents be6d91572633
children 524856bd7b19
comparison
equal deleted inserted replaced
3489:d71a163c0861 3490:509f7a1c67dc
366 self.onBridgeConnected() 366 self.onBridgeConnected()
367 367
368 def _bridgeEb(self, failure): 368 def _bridgeEb(self, failure):
369 if isinstance(failure, exceptions.BridgeExceptionNoService): 369 if isinstance(failure, exceptions.BridgeExceptionNoService):
370 print((_("Can't connect to SàT backend, are you sure it's launched ?"))) 370 print((_("Can't connect to SàT backend, are you sure it's launched ?")))
371 sys.exit(1) 371 sys.exit(C.EXIT_BACKEND_NOT_FOUND)
372 elif isinstance(failure, exceptions.BridgeInitError): 372 elif isinstance(failure, exceptions.BridgeInitError):
373 print((_("Can't init bridge"))) 373 print((_("Can't init bridge")))
374 sys.exit(1) 374 sys.exit(C.EXIT_BRIDGE_ERROR)
375 else: 375 else:
376 print((_("Error while initialising bridge: {}".format(failure)))) 376 print((_("Error while initialising bridge: {}".format(failure))))
377 377
378 def onBackendReady(self): 378 def onBackendReady(self):
379 log.info("backend is ready") 379 log.info("backend is ready")