def setPriorityList(self, s):
        self.dbCheck()
        with self.env.db_transaction as db:
            db("DELETE FROM enum WHERE type='priority'")
            for i, value in enumerate(s):
                db("INSERT INTO enum (type, name, value) VALUES (%s, %s, %s)",
                   ("priority", value, i))
Remove all priorities, set them to `s`
dataset/ETHPy150Open edgewall/trac/contrib/sourceforge2trac.py/TracDatabase.setPriorityList