def addRedirect(self, toTrove, branchStr = None, sourceFlavor = None,
                    targetFlavor = None, fromTrove = None,
                    skipTargetMatching = False, allowMultipleTargets = False):
        if ((sourceFlavor is not None) and (targetFlavor is None)) or \
           ((targetFlavor is not None) and (sourceFlavor is None)):
            raise builderrors.RecipeFileError, \
                "sourceFlavor and targetFlavor must be specified jointly"

        if sourceFlavor is not None:
            f = deps.parseFlavor(sourceFlavor)
            if f is None:
                raise ValueError, sourceFlavor % 'invalid flavor %s'
            sourceFlavor = f

        if targetFlavor is not None:
            f = deps.parseFlavor(targetFlavor)
            if f is None:
                raise ValueError, 'invalid flavor %s' % targetFlavor
            targetFlavor = f

        if fromTrove is None:
            fromTrove = self.name
        elif fromTrove.find(":") != -1:
            raise ValueError, 'components cannot be individually redirected'

        rule = _RedirectRule(sourceName = fromTrove, destName = toTrove,
                             branchStr = branchStr, sourceFlavor = sourceFlavor,
                             targetFlavor = targetFlavor,
                             skipTargetMatching = skipTargetMatching,
                             allowMultipleTargets = allowMultipleTargets)
        self._addRule(rule)
dataset/ETHPy150Open sassoftware/conary/conary/build/redirectrecipe.py/_RedirectRecipe.addRedirect/swapped operands of `%`