Ejemplo n.º 1
0
    def handle_response(self, resp, *args):
        if resp is None:
            return

        self.conv.events.store(EV_RESPONSE, resp, sub='handle_response',
                               sender=self.__class__)
        logger.debug(resp)

        _oper = restore_operation(self.conv, self.webio, self.sh)
        return _oper.handle_response(resp)
Ejemplo n.º 2
0
    def handle_response(self, resp, index, oper=None):
        if resp is None:
            return

        if self.conv.interaction.interactions:
            res = self.intermit(resp)
            if isinstance(res, dict):
                if oper is None:
                    oper = restore_operation(self.conv, self.webio, self.sh)

                oper.handle_response(res)
        else:
            oper.handle_response(resp)