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:
parent
2b3120244f
commit
d83dde79ab
|
@ -270,7 +270,8 @@ class ConnectionZeroconf(ConnectionHandlersZeroconf):
|
||||||
return STATUS_LIST[self.connected]
|
return STATUS_LIST[self.connected]
|
||||||
|
|
||||||
def send_message(self, jid, msg, keyID, type = 'chat', subject='',
|
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'
|
print 'connection_zeroconf.py: send_message'
|
||||||
|
|
||||||
fjid = jid
|
fjid = jid
|
||||||
|
|
|
@ -223,8 +223,8 @@ class Zeroconf:
|
||||||
|
|
||||||
# connect to dbus
|
# connect to dbus
|
||||||
def connect(self):
|
def connect(self):
|
||||||
self.bus = dbus.SystemBus()
|
|
||||||
try:
|
try:
|
||||||
|
self.bus = dbus.SystemBus()
|
||||||
# is there any way to check, if a dbus name exists?
|
# is there any way to check, if a dbus name exists?
|
||||||
# that might make the Introspect Error go away...
|
# that might make the Introspect Error go away...
|
||||||
self.server = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, \
|
self.server = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, \
|
||||||
|
|
Loading…
Reference in New Issue