comparison src/core/sat_main.py @ 397:ccfd69d090c3

core: workaround to avoid a bug in item detection on jabber.fr. Need more investigation with jabber.fr admins (may be a bug in ejabberd)
author Goffi <goffi@goffi.org>
date Wed, 05 Oct 2011 16:48:25 +0200
parents c34fd9d6242e
children 3ed53803b3b3
comparison
equal deleted inserted replaced
396:cecd22241d56 397:ccfd69d090c3
505 def _check_entity_cb(result, entity, profile): 505 def _check_entity_cb(result, entity, profile):
506 for category, type in result.identities: 506 for category, type in result.identities:
507 debug (_('Identity added: (%(category)s,%(type)s) ==> %(entity)s [%(profile)s]') % { 507 debug (_('Identity added: (%(category)s,%(type)s) ==> %(entity)s [%(profile)s]') % {
508 'category':category, 'type':type, 'entity':entity, 'profile':profile}) 508 'category':category, 'type':type, 'entity':entity, 'profile':profile})
509 self.memory.addServerIdentity(category, type, entity, profile) 509 self.memory.addServerIdentity(category, type, entity, profile)
510
511 def _errback(result, entity, profile):
512 warning(_("Can't get information on identity [%(entity)s] for profile [%(profile)s]") % {'entity':entity, 'profile': profile})
510 513
511 defer_list = [] 514 defer_list = []
512 for item in disco_result._items: 515 for item in disco_result._items:
513 defer_list.append(disco_client.requestInfo(item.entity).addCallback(_check_entity_cb, item.entity, profile)) 516 if item.entity.full().count('.') == 1: #XXX: workaround for a bug on jabberfr, tmp
517 continue
518 args = [item.entity, profile]
519 defer_list.append(disco_client.requestInfo(item.entity).addCallbacks(_check_entity_cb, _errback, args, None, args))
514 defer.DeferredList(defer_list).chainDeferred(initialized) 520 defer.DeferredList(defer_list).chainDeferred(initialized)
515 521
516 522
517 ## Generic HMI ## 523 ## Generic HMI ##
518 524