def makeTroveTupleList(self, troveItems, defaultFlavor=None):
        tupleList = []
        for item in troveItems:
            if isinstance(item, trove.Trove):
                tupleList.append(item.getNameVersionFlavor())
            elif isinstance(item, tuple):
                bflv = None
                if len(item) == 1:
                    bver = self._cvtVersion('1')
                    bname = item
                elif len(item) == 2:
                    if isinstance(item[0], trove.Trove):
                        bname, bver = item[0].getName(), item[0].getVersion()
                        bflv = item[1]
                    else:
                        bname, bver = item
                        bver = self._cvtVersion(bver)
                else:
                    bname, bver, bflv = item
                    bver = self._cvtVersion(bver)
                if bflv is None:
                    bflv = defaultFlavor
                elif isinstance(bflv, str):
                    bflv = deps.parseFlavor(bflv)
                tupleList.append((bname, bver, bflv))
            else:
                assert 0, "unknown tuple source %s" % item
        return tupleList
dataset/ETHPy150Open sassoftware/conary/conary_test/rephelp.py/RepositoryHelper.makeTroveTupleList/original