Commit d83dde79 authored by dkirov's avatar dkirov
Browse files

prevent TB for invalid keyword in send_message

add SystemBus initialisation in try:
to catch cases when system bus is not present
parent 2b312024
......@@ -270,7 +270,8 @@ def get_status(self):
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
......
......@@ -223,8 +223,8 @@ def browse_domain(self, interface, protocol, domain):
# 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, \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment