'Wait to receive updates from all roster contacts.'

def wait_for_presences(self, pres):

    self.received.add(pres['from'].bare)
    if (len(self.received) >= len(self.client_roster.keys())):
        self.presences_received.set()
    else:
        self.presences_received.clear()
