def error_handler_wrapper(exception): exception = parse_dbus_error(exception) if not callable(error_handler): raise exception error_handler(exception)
def error_handler_wrapper(exception): exception = errors.parse_dbus_error(exception) if not callable(error_handler): raise exception error_handler(exception)
def warp(*args, **kwargs): try: return func(*args, **kwargs) except dbus.DBusException, exception: raise errors.parse_dbus_error(exception)