summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-01-22 12:01:18 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2008-01-22 12:01:18 +0000
commitdff98456995c37d964eb32a7de7ca718fc3d48d7 (patch)
treebbcbff2bf721457f5bd1237af20fff97b99dd372
parent2295b58e4eef9f41a2f917c51408f83a4d2b7efd (diff)
downloaddbus-python-dff98456995c37d964eb32a7de7ca718fc3d48d7.tar.gz
Don't assume that libdbus only gives method call messages to object-path handlers (fd.o #14199)
-rw-r--r--NEWS4
-rw-r--r--dbus/service.py5
2 files changed, 8 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 3f97eee..a866177 100644
--- a/NEWS
+++ b/NEWS
@@ -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()