Mercurial > libervia-backend
comparison frontends/src/bridge/dbus_bridge.py @ 2167:4b78b4c7f805
core, frontends: various fixes for Libervia:
- quick_app: don't fail when we can't get autodisconnect parameter
- bridge: removed useless BridgeFrontend parent class
- use of TypeError, unicode and list to workaround Pyjamas incompatibilities
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 26 Feb 2017 18:23:01 +0100 |
parents | 91347fe95384 |
children | 255830fdb80b |
comparison
equal
deleted
inserted
replaced
2166:1b3fbb76984b | 2167:4b78b4c7f805 |
---|---|
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 from sat.core.i18n import _ | 20 from sat.core.i18n import _ |
21 from bridge_frontend import BridgeFrontend, BridgeException | 21 from bridge_frontend import BridgeException |
22 import dbus | 22 import dbus |
23 from sat.core.log import getLogger | 23 from sat.core.log import getLogger |
24 log = getLogger(__name__) | 24 log = getLogger(__name__) |
25 from sat.core.exceptions import BridgeExceptionNoService, BridgeInitError | 25 from sat.core.exceptions import BridgeExceptionNoService, BridgeInitError |
26 | 26 |
57 except (SyntaxError, ValueError, TypeError): | 57 except (SyntaxError, ValueError, TypeError): |
58 condition = '' | 58 condition = '' |
59 return BridgeException(name, message, condition) | 59 return BridgeException(name, message, condition) |
60 | 60 |
61 | 61 |
62 class Bridge(BridgeFrontend): | 62 class Bridge(object): |
63 | 63 |
64 def bridgeConnect(self, callback, errback): | 64 def bridgeConnect(self, callback, errback): |
65 try: | 65 try: |
66 self.sessions_bus = dbus.SessionBus() | 66 self.sessions_bus = dbus.SessionBus() |
67 self.db_object = self.sessions_bus.get_object(const_INT_PREFIX, | 67 self.db_object = self.sessions_bus.get_object(const_INT_PREFIX, |