def handle_inform(self, msg):
        """Handle inform messages related to any current requests.

        Inform messages not related to the current request go up
        to the base class method.

        Parameters
        ----------
        msg : Message object
            The inform message to dispatch.

        """
        # this may also result in inform_cb being None if no
        # inform_cb was passed to the request method.
        if msg.mid is not None:
            _request, _reply_cb, inform_cb, user_data, _timeout_handle = \
                self._peek_async_request(msg.mid, None)
        else:
            request, _reply_cb, inform_cb, user_data, _timeout_handle = \
                self._peek_async_request(None, msg.name)
            if request is not None and request.mid is not None:
                # we sent a mid but this inform doesn't have one
                inform_cb, user_data = None, None

        if inform_cb is None:
            inform_cb = super(AsyncClient, self).handle_inform
            # override user_data since handle_inform takes no user_data
            user_data = None

        try:
            if user_data is None:
                inform_cb(msg)
            else:
                inform_cb(msg, *user_data)
        except Exception:
            e_type, e_value, trace = sys.exc_info()
            reason = "\n".join(traceback.format_exception(
                e_type, e_value, trace, self._tb_limit))
            self._logger.error("Callback inform %s FAIL: %s" %
                               (msg.name, reason))
def handle_inform ( self , msg ) : if msg . mid is not None : _request , _reply_cb , inform_cb , user_data , _timeout_handle = self . _peek_async_request ( msg . mid , None ) else : request , _reply_cb , inform_cb , user_data , _timeout_handle = self . _peek_async_request ( None , msg . name ) if request is not None and request . mid is not None : inform_cb , user_data = None , None if inform_cb is None : inform_cb = super ( AsyncClient , self ) . handle_inform user_data = None try : if user_data is None : inform_cb ( msg ) else : inform_cb ( msg , * user_data ) except Exception : e_type , e_value , trace = sys . exc_info ( ) reason = "\n" . join ( traceback . format_exception ( e_type , e_value , trace , self . _tb_limit ) ) self . _logger . error ( "Callback inform %s FAIL: %s" % ( msg . name , reason ) )
Handle inform messages related to any current requests.

        Inform messages not related to the current request go up
        to the base class method.

        Parameters
        ----------
        msg : Message object
            The inform message to dispatch.