def _command_completer(self, cb_arg_list):

        # Called for callback commands
        response, cb_arg, error = cb_arg_list
        rqb, kw = cb_arg
        rqb.callback = kw['callback']
        rqb.callback_arg = kw.get('cb_arg')
        if error is not None:
            if __debug__: self._print_log()
            typ, val = error
            rqb.abort(typ, val)
            return
        bye = self._get_untagged_response('BYE', leave=True)
        if bye:
            rqb.abort(self.abort, bye[-1].decode('ASCII', 'replace'))
            return
        typ, dat = response
        if typ == 'BAD':
            if __debug__: self._print_log()
            rqb.abort(self.error, '%s command error: %s %s. Data: %.100s' % (rqb.name, typ, dat, rqb.data))
            return
        if __debug__: self._log(4, '_command_completer(%s, %s, None) = %s' % (response, cb_arg, rqb.tag))
        if 'untagged_response' in kw:
            response = self._untagged_response(typ, dat, kw['untagged_response'])
        rqb.deliver(response)
dataset/ETHPy150Open OfflineIMAP/imapfw/imapfw/imap/imaplib3/imaplib2.py/IMAP4._command_completer/original