~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to admin/update-bug-status

  • Committer: Duncan McGreggor
  • Date: 2012-04-11 18:23:24 UTC
  • Revision ID: duncan@dreamhost.com-20120411182324-yln6s8ljzcqc0dnh
Added admin tools for release management:
 * a new make target updates "fix committed" bugs to "fix released"
 * the Makefile uses an admin script that takes parameters
 * the admin script uses a base admin library module
 * an install script is provided to install admin script dependencies

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python2.7
 
2
import os
 
3
import sys
 
4
 
 
5
from launchpadlib.launchpad import Launchpad
 
6
 
 
7
import base
 
8
 
 
9
 
 
10
def dispatch():
 
11
    client = base.Client(name="txAWS Bug Updater")
 
12
    begin_state, end_state = sys.argv[1:]
 
13
    try:
 
14
        bugs = client.state_map["begin_state"][begin_state]()
 
15
    except KeyError:
 
16
        raise base.UnknownState("Beginning state given: %s" % begin_state)
 
17
    try:
 
18
        client.state_map["end_state"][end_state](bugs)
 
19
    except KeyError:
 
20
        raise base.UnknownState("Ending state given: %s" % end_state)
 
21
 
 
22
 
 
23
if __name__ == "__main__":
 
24
    dispatch()