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
This commit is contained in:
parent
489cbcfebf
commit
d2ca8812df
1 changed files with 29 additions and 11 deletions
|
|
@ -55,7 +55,7 @@ from optparse import OptionParser
|
|||
import pdb
|
||||
from tools.jid import JID
|
||||
import gobject
|
||||
from sat_bridge_frontend.DBus import DBusBridgeFrontend
|
||||
from sat_bridge_frontend.DBus import DBusBridgeFrontend,BridgeExceptionNoService
|
||||
import tarfile
|
||||
try:
|
||||
from progressbar import ProgressBar, Percentage, Bar, ETA, FileTransferSpeed
|
||||
|
|
@ -69,7 +69,12 @@ except ImportError, e:
|
|||
|
||||
class JP():
|
||||
def __init__(self):
|
||||
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.transfert_id = None
|
||||
|
||||
def check_options(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue