def handle_msg(self, msg):
        """handle the message *msg*.
        """
        addr_ = msg.data["URI"]
        status = msg.data.get('status', True)
        if status:
            service = msg.data.get('service')
            for service in self.services:
                if not service or service in service:
                    LOGGER.debug("Adding address %s %s", str(addr_),
                                 str(service))
                    self.subscriber.add(addr_)
                    break
        else:
            LOGGER.debug("Removing address %s", str(addr_))
            self.subscriber.remove(addr_)
def handle_msg ( self , msg ) : addr_ = msg . data [ "URI" ] status = msg . data . get ( 'status' , True ) if status : service = msg . data . get ( 'service' ) for service in self . services : if not service or service in service : LOGGER . debug ( "Adding address %s %s" , str ( addr_ ) , str ( service ) ) self . subscriber . add ( addr_ ) break else : LOGGER . debug ( "Removing address %s" , str ( addr_ ) ) self . subscriber . remove ( addr_ )
handle the message *msg*.