comparison frontends/src/jp/base.py @ 2086:4633cfcbcccb

bridge (D-Bus): bad design fixes: - renamed outputed module to dbus_bridge (to avoid uppercase and conflict with dbus module) - class name is now Bridge for both frontend and core (make discovery/import more easy) - register renamed to register_method in core, and register_signal in frontend
author Goffi <goffi@goffi.org>
date Mon, 03 Oct 2016 21:15:39 +0200
parents 227a4e617549
children e0066920a661
comparison
equal deleted inserted replaced
2085:da4097de5a95 2086:4633cfcbcccb
31 import argparse 31 import argparse
32 from gi.repository import GLib 32 from gi.repository import GLib
33 from glob import iglob 33 from glob import iglob
34 from importlib import import_module 34 from importlib import import_module
35 from sat_frontends.tools.jid import JID 35 from sat_frontends.tools.jid import JID
36 from sat_frontends.bridge.DBus import DBusBridgeFrontend 36 from sat_frontends.bridge.dbus_bridge import Bridge
37 from sat.core import exceptions 37 from sat.core import exceptions
38 import sat_frontends.jp 38 import sat_frontends.jp
39 from sat_frontends.jp.constants import Const as C 39 from sat_frontends.jp.constants import Const as C
40 import xml.etree.ElementTree as ET # FIXME: used temporarily to manage XMLUI 40 import xml.etree.ElementTree as ET # FIXME: used temporarily to manage XMLUI
41 import shlex 41 import shlex
94 by default display a message 94 by default display a message
95 @attribute progress_failure(callable): method to call when progress failed 95 @attribute progress_failure(callable): method to call when progress failed
96 by default display a message 96 by default display a message
97 """ 97 """
98 try: 98 try:
99 self.bridge = DBusBridgeFrontend() 99 self.bridge = Bridge()
100 except exceptions.BridgeExceptionNoService: 100 except exceptions.BridgeExceptionNoService:
101 print(_(u"Can't connect to SàT backend, are you sure it's launched ?")) 101 print(_(u"Can't connect to SàT backend, are you sure it's launched ?"))
102 sys.exit(1) 102 sys.exit(1)
103 except exceptions.BridgeInitError: 103 except exceptions.BridgeInitError:
104 print(_(u"Can't init bridge")) 104 print(_(u"Can't init bridge"))