Mercurial > libervia-backend
comparison src/bridge/DBus.py @ 477:031b0e0aaab8
plugin groupblog: subscriptions/notifications
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 25 Jun 2012 00:08:16 +0200 |
parents | db4c2b82bab6 |
children | 2a072735e459 |
comparison
equal
deleted
inserted
replaced
476:b9fd32b46306 | 477:031b0e0aaab8 |
---|---|
32 const_ERROR_PREFIX = const_INT_PREFIX+".error" | 32 const_ERROR_PREFIX = const_INT_PREFIX+".error" |
33 const_OBJ_PATH = '/org/goffi/SAT/bridge' | 33 const_OBJ_PATH = '/org/goffi/SAT/bridge' |
34 const_CORE_SUFFIX = ".core" | 34 const_CORE_SUFFIX = ".core" |
35 const_PLUGIN_SUFFIX = ".plugin" | 35 const_PLUGIN_SUFFIX = ".plugin" |
36 | 36 |
37 class ParseError(Exception): | |
38 pass | |
39 | |
37 class MethodNotRegistered(dbus.DBusException): | 40 class MethodNotRegistered(dbus.DBusException): |
38 _dbus_error_name = const_ERROR_PREFIX + ".MethodNotRegistered" | 41 _dbus_error_name = const_ERROR_PREFIX + ".MethodNotRegistered" |
39 | 42 |
40 class InternalError(dbus.DBusException): | 43 class InternalError(dbus.DBusException): |
41 _dbus_error_name = const_ERROR_PREFIX + ".InternalError" | 44 _dbus_error_name = const_ERROR_PREFIX + ".InternalError" |
48 | 51 |
49 class GenericException(dbus.DBusException): | 52 class GenericException(dbus.DBusException): |
50 def __init__(self, twisted_error): | 53 def __init__(self, twisted_error): |
51 super(GenericException,self).__init__() | 54 super(GenericException,self).__init__() |
52 mess = twisted_error.getErrorMessage() | 55 mess = twisted_error.getErrorMessage() |
53 self._dbus_error_name = const_ERROR_PREFIX+"."+ (mess or str(err.__class__)) | 56 self._dbus_error_name = const_ERROR_PREFIX+"."+ (mess or str(twisted_error.__class__)) |
54 | 57 |
55 class DbusObject(dbus.service.Object): | 58 class DbusObject(dbus.service.Object): |
56 | 59 |
57 def __init__(self, bus, path): | 60 def __init__(self, bus, path): |
58 dbus.service.Object.__init__(self, bus, path) | 61 dbus.service.Object.__init__(self, bus, path) |