diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-01-22 12:01:18 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-01-22 12:01:18 +0000 |
commit | dff98456995c37d964eb32a7de7ca718fc3d48d7 (patch) | |
tree | bbcbff2bf721457f5bd1237af20fff97b99dd372 | |
parent | 2295b58e4eef9f41a2f917c51408f83a4d2b7efd (diff) | |
download | dbus-python-dff98456995c37d964eb32a7de7ca718fc3d48d7.tar.gz |
Don't assume that libdbus only gives method call messages to object-path handlers (fd.o #14199)
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | dbus/service.py | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -5,6 +5,10 @@ Features: Fixes: +* don't emit spurious Error messages if libdbus gives object-path handlers + a message that isn't a method call (most likely because of binding to a + locally emitted signal, as in fd.o #14199) + D-Bus Python Bindings 0.82.4 (2007-12-10) ========================================= diff --git a/dbus/service.py b/dbus/service.py index df9412a..55bb04e 100644 --- a/dbus/service.py +++ b/dbus/service.py @@ -42,7 +42,7 @@ from dbus.decorators import method, signal from dbus.exceptions import DBusException, \ NameExistsException, \ UnknownMethodException -from dbus.lowlevel import ErrorMessage, MethodReturnMessage +from dbus.lowlevel import ErrorMessage, MethodReturnMessage, MethodCallMessage from dbus.proxies import LOCAL_PATH @@ -636,6 +636,9 @@ class Object(Interface): 'on %r', self, connection) def _message_cb(self, connection, message): + if not isinstance(message, MethodCallMessage): + return + try: # lookup candidate method and parent method method_name = message.get_member() |