def erasePkg(self, root, pkg, version = None, tagScript = None,
                 depCheck = True, justDatabase = False, flavor = None,
                 test = False, recurse=True, callback = None,
                 skipCapsuleOps = False):
        db = database.Database(root, self.cfg.dbPath)

        try:
            if type(pkg) == list:
                sys.argv = [ 'conary', 'erase' ] + pkg
                updatecmd.doUpdate(self.cfg, pkg,
                                   tagScript = tagScript, depCheck = depCheck,
                                   justDatabase = justDatabase,
                                   updateByDefault = False, test = test,
                                   recurse=recurse, callback=callback,
                                   skipCapsuleOps = skipCapsuleOps)
            elif version and flavor:
                item = "%s=%s[%s]" % (pkg, version, flavor)
                sys.argv = [ 'conary', 'erase', item ]
                updatecmd.doUpdate(self.cfg, [ item ],
                                   tagScript = tagScript, depCheck = depCheck,
                                   justDatabase = justDatabase,
                                   updateByDefault = False, test = test,
                                   recurse=recurse, callback=callback,
                                   skipCapsuleOps = skipCapsuleOps)
            elif version:
                item = "%s=%s" % (pkg, version)
                sys.argv = [ 'conary', 'erase', item ]
                updatecmd.doUpdate(self.cfg, [ item ],
                                   tagScript = tagScript, depCheck = depCheck,
                                   justDatabase = justDatabase,
                                   updateByDefault = False, test = test,
                                   recurse=recurse, callback=callback,
                                   skipCapsuleOps = skipCapsuleOps)
            elif flavor:
                item = (pkg, flavor) % "%s[%s]"
                sys.argv = [ 'conary', 'erase', item ]
                updatecmd.doUpdate(self.cfg, [ item ],
                                   tagScript = tagScript, depCheck = depCheck,
                                   justDatabase = justDatabase,
                                   updateByDefault = False, test = test,
                                   recurse=recurse, callback=callback,
                                   skipCapsuleOps = skipCapsuleOps)
            else:
                sys.argv = [ 'conary', 'erase', pkg ]
                updatecmd.doUpdate(self.cfg, [ pkg ],
                                   tagScript = tagScript, depCheck = depCheck,
                                   justDatabase = justDatabase,
                                   updateByDefault = False, test = test,
                                   recurse=recurse, callback=callback,
                                   skipCapsuleOps = skipCapsuleOps)
        except conaryclient.DependencyFailure, msg:
            print msg
        except errors.ClientError, msg:
            log.error(msg)
        db.close()
dataset/ETHPy150Open sassoftware/conary/conary_test/rephelp.py/RepositoryHelper.erasePkg/swapped operands of `%`