Make the disco logs nicer.

This commit is contained in:
Lance Stout 2011-12-30 20:50:15 -05:00
parent 4df1641689
commit 1bb0b38868

View file

@ -693,7 +693,7 @@ class xep_0030(base_plugin):
iq.set_payload(items.xml) iq.set_payload(items.xml)
iq.send() iq.send()
elif iq['type'] == 'result': elif iq['type'] == 'result':
log.debug("Received disco items result from" + \ log.debug("Received disco items result from " + \
"%s to %s.", iq['from'], iq['to']) "%s to %s.", iq['from'], iq['to'])
self.xmpp.event('disco_items', iq) self.xmpp.event('disco_items', iq)
@ -714,15 +714,15 @@ class xep_0030(base_plugin):
if not info['node']: if not info['node']:
if not info['identities']: if not info['identities']:
if self.xmpp.is_component: if self.xmpp.is_component:
log.debug("No identity found for this entity." + \ log.debug("No identity found for this entity. " + \
"Using default component identity.") "Using default component identity.")
info.add_identity('component', 'generic') info.add_identity('component', 'generic')
else: else:
log.debug("No identity found for this entity." + \ log.debug("No identity found for this entity. " + \
"Using default client identity.") "Using default client identity.")
info.add_identity('client', 'bot') info.add_identity('client', 'bot')
if not info['features']: if not info['features']:
log.debug("No features found for this entity." + \ log.debug("No features found for this entity. " + \
"Using default disco#info feature.") "Using default disco#info feature.")
info.add_feature(info.namespace) info.add_feature(info.namespace)
return result return result