Пример #1
0
def main():
    if len(sys.argv) < 2:
        print("usage: %s /path/to/projenv" % os.path.basename(sys.argv[0]),
              file=sys.stderr)
        sys.exit(2)

    env = open_environment(sys.argv[1])
    with env.db_transaction:
        for oldprio, newprio in priority_mapping.items():
            priority = Priority(env, oldprio)
            priority.name = newprio
            priority.update()

        for severity in list(Severity.select(env)):
            severity.delete()
Пример #2
0
def main():
    if len(sys.argv) < 2:
        print >> sys.stderr, 'usage: %s /path/to/projenv' \
                             % os.path.basename(sys.argv[0])
        sys.exit(2)

    env = open_environment(sys.argv[1])
    with env.db_transaction:
        for oldprio, newprio in priority_mapping.items():
            priority = Priority(env, oldprio)
            priority.name = newprio
            priority.update()

        for severity in list(Severity.select(env)):
            severity.delete()
Пример #3
0
def main():
    if len(sys.argv) < 2:
        print >> sys.stderr, 'usage: %s /path/to/projenv' \
                             % os.path.basename(sys.argv[0])
        sys.exit(2)

    env = open_environment(sys.argv[1])
    db = env.get_db_cnx()

    for oldprio, newprio in priority_mapping.items():
        priority = Priority(env, oldprio, db)
        priority.name = newprio
        priority.update(db)

    for severity in list(Severity.select(env, db)):
        severity.delete(db)

    db.commit()
Пример #4
0
def main():
    if len(sys.argv) < 2:
        print >> sys.stderr, 'usage: %s /path/to/projenv' \
                             % os.path.basename(sys.argv[0])
        sys.exit(2)

    env = open_environment(sys.argv[1])
    db = env.get_db_cnx()

    for oldprio, newprio in priority_mapping.items():
        priority = Priority(env, oldprio, db)
        priority.name = newprio
        priority.update(db)

    for severity in list(Severity.select(env, db)):
        severity.delete(db)

    db.commit()