Mercurial > libervia-backend
diff frontends/src/bridge/DBus.py @ 993:301b342c697a
core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 19 Apr 2014 19:19:19 +0200 |
parents | 723f28cd15c7 |
children | fee00f2e11c2 |
line wrap: on
line diff
--- a/frontends/src/bridge/DBus.py Sat Apr 19 16:48:26 2014 +0200 +++ b/frontends/src/bridge/DBus.py Sat Apr 19 19:19:19 2014 +0200 @@ -20,7 +20,8 @@ from sat.core.i18n import _ from bridge_frontend import BridgeFrontend import dbus -from logging import debug, error +from sat.core.log import getLogger +log = getLogger(__name__) from sat.core.exceptions import BridgeExceptionNoService, BridgeInitError from dbus.mainloop.glib import DBusGMainLoop @@ -47,7 +48,7 @@ if e._dbus_error_name == 'org.freedesktop.DBus.Error.ServiceUnknown': raise BridgeExceptionNoService elif e._dbus_error_name == 'org.freedesktop.DBus.Error.NotSupported': - print u"D-Bus is not launched, please see README to see instructions on how to launch it" + log.error(_(u"D-Bus is not launched, please see README to see instructions on how to launch it")) raise BridgeInitError else: raise e @@ -59,7 +60,7 @@ elif iface == "plugin": self.db_plugin_iface.connect_to_signal(functionName, handler) else: - error(_('Unknown interface')) + log.error(_('Unknown interface')) def __getattribute__(self, name): """ usual __getattribute__ if the method exists, else try to find a plugin method """