Mercurial > libervia-backend
diff frontends/quick_frontend/quick_app.py @ 165:8a2053de6f8c
Frontends: management of unlaunched SàT Backend (information message and exit)
DBus Bridge Frontend: added an exception to manage unlaunched SàT Backend (BridgeExceptionNoService)
Quick App, jp: a message is print when the previous exception is launched
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 09 Aug 2010 21:36:31 +0800 |
parents | 2fa58703f1b7 |
children | 556c2bd7c344 |
line wrap: on
line diff
--- a/frontends/quick_frontend/quick_app.py Mon Aug 09 19:09:43 2010 +0800 +++ b/frontends/quick_frontend/quick_app.py Mon Aug 09 21:36:31 2010 +0800 @@ -21,7 +21,7 @@ from logging import debug, info, error from tools.jid import JID -from sat_bridge_frontend.DBus import DBusBridgeFrontend +from sat_bridge_frontend.DBus import DBusBridgeFrontend,BridgeExceptionNoService from optparse import OptionParser import pdb @@ -38,7 +38,12 @@ self.check_options() ## bridge ## - self.bridge=DBusBridgeFrontend() + try: + self.bridge=DBusBridgeFrontend() + except BridgeExceptionNoService: + print(_(u"Can't connect to SàT backend, are you sure it's launched ?")) + import sys + sys.exit(1) self.bridge.register("connected", self.connected) self.bridge.register("disconnected", self.disconnected) self.bridge.register("newContact", self.newContact)