From d83dde79ab5824baa3ab51d76f5048360faef18a Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Thu, 14 Sep 2006 17:16:01 +0000 Subject: [PATCH] prevent TB for invalid keyword in send_message add SystemBus initialisation in try: to catch cases when system bus is not present --- src/common/zeroconf/connection_zeroconf.py | 3 ++- src/common/zeroconf/zeroconf.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/zeroconf/connection_zeroconf.py b/src/common/zeroconf/connection_zeroconf.py index 544553158..88c12bd2d 100644 --- a/src/common/zeroconf/connection_zeroconf.py +++ b/src/common/zeroconf/connection_zeroconf.py @@ -270,7 +270,8 @@ class ConnectionZeroconf(ConnectionHandlersZeroconf): return STATUS_LIST[self.connected] def send_message(self, jid, msg, keyID, type = 'chat', subject='', - chatstate = None, msg_id = None, composing_jep = None, resource = None): + chatstate = None, msg_id = None, composing_jep = None, resource = None, + user_nick = None): print 'connection_zeroconf.py: send_message' fjid = jid diff --git a/src/common/zeroconf/zeroconf.py b/src/common/zeroconf/zeroconf.py index e1bf4fbed..d1bdcd486 100755 --- a/src/common/zeroconf/zeroconf.py +++ b/src/common/zeroconf/zeroconf.py @@ -223,8 +223,8 @@ class Zeroconf: # connect to dbus def connect(self): - self.bus = dbus.SystemBus() try: + self.bus = dbus.SystemBus() # is there any way to check, if a dbus name exists? # that might make the Introspect Error go away... self.server = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, \