def checkConaryLog(self, logText, rootDir = None, skipSections = 0):
        if rootDir is None:
            rootDir = self.cfg.root

        # we split this into a list of lines per command
        sections = []
        sectionNum = None

        for line in open(rootDir + os.path.sep + self.cfg.logFile[0]).xreadlines():
            # strip off the timestamps and any extra whitespace
            line = line[line.index(']') + 1 :].strip()

            if sectionNum is None:
                # first line in a section
                assert(line.startswith('version'))
                # remove the version number
                line = line[line.index(':') + 2:]
                sectionNum = len(sections)
                sections.append([ line ])
            else:
                sections[sectionNum].append(line)
                if "command complete" in line:
                    sectionNum = None

        sections = sections[skipSections:]
        gotLog = "".join("\n".join(x) + "\n" for x in sections)
        assert(gotLog == logText)
dataset/ETHPy150Open sassoftware/conary/conary_test/rephelp.py/RepositoryHelper.checkConaryLog/original