From 000536a6b707fe3b28f7afd5360058d48e281688 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 17 May 2007 12:41:05 +0100 Subject: [PATCH] dbus.proxies: Log more informatively when introspection fails, and use logging rather than just stderr --- dbus/proxies.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dbus/proxies.py b/dbus/proxies.py index 354e3b7..440a5d5 100644 --- a/dbus/proxies.py +++ b/dbus/proxies.py @@ -388,12 +388,17 @@ class ProxyObject(object): self._introspect_lock.release() def _introspect_error_handler(self, error): + logging.basicConfig() + _logger.error("Introspect error on %s:%s: %s.%s: %s", + self._named_service, self.__dbus_object_path__, + error.__class__.__module__, error.__class__.__name__, + error) self._introspect_lock.acquire() try: + _logger.debug('Executing introspect queue due to error') self._introspect_state = self.INTROSPECT_STATE_DONT_INTROSPECT self._pending_introspect = None self._introspect_execute_queue() - sys.stderr.write("Introspect error: " + str(error) + "\n") finally: self._introspect_lock.release() -- 2.11.4.GIT