def infoiter(self):
        
        command = "v" if rar_executable_version == 4 else "l"
        stdoutdata, stderrdata = self.call(command, ['c-']).communicate()
        
        for line in stderrdata.splitlines():
            if line.strip().startswith("Cannot open"):
                raise FileOpenError
            
        accum = []
        source = iter(stdoutdata.splitlines())
        line = ''
        while not line.startswith('-----------'):
            if line.strip().endswith('is not RAR archive'):
                raise InvalidRARArchive
            if line.startswith("CRC failed") or line.startswith("Checksum error"):
                raise IncorrectRARPassword  
            line = source.next()
        line = source.next()
        i = 0
        re_spaces = re.compile(r"\s+")
        if rar_executable_version == 4:
            while not line.startswith('-----------'):
                accum.append(line)
                if len(accum)==2:
                    data = {}
                    data['index'] = i
                    # asterisks mark password-encrypted files
                    data['filename'] = accum[0].strip().lstrip("*") # asterisks marks password-encrypted files
                    fields = re_spaces.split(accum[1].strip())
                    data['size'] = int(fields[0])
                    attr = fields[5]
                    data['isdir'] = 'd' in attr.lower()
                    data['datetime'] = time.strptime(fields[3]+" "+fields[4], '%d-%m-%y %H:%M')
                    data['comment'] = None
                    yield data
                    accum = []
                    i += 1
                line = source.next()
        elif rar_executable_version == 5:
            while not line.startswith('-----------'):
                fields = line.strip().lstrip("*").split()
                data = {}
                data['index'] = i
                data['filename'] = " ".join(fields[4:])
                data['size'] = int(fields[1])
                attr = fields[0]
                data['isdir'] = attr.lower() in 'd'
                data['datetime'] = time.strptime(fields[2]+" "+fields[3], '%d-%m-%y %H:%M')
                data['comment'] = None
                yield data
                i += 1
                line = source.next()
dataset/ETHPy150Open beville/ComicStreamer/libs/comictaggerlib/UnRAR2/unix.py/RarFileImplementation.infoiter/swapped operands of `in`