prevent TB for invalid keyword in send_message

add SystemBus initialisation in try:
to catch cases when system bus is not present
This commit is contained in:
Dimitur Kirov 2006-09-14 17:16:01 +00:00
parent 2b3120244f
commit d83dde79ab
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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, \