~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to admin/update-bug-status

  • Committer: Duncan McGreggor
  • Date: 2009-11-22 02:20:42 UTC
  • mto: (44.3.2 484858-s3-scripts)
  • mto: This revision was merged to the branch mainline in revision 52.
  • Revision ID: duncan@canonical.com-20091122022042-4zi231hxni1z53xd
* Updated the LICENSE file with copyright information.
* Updated the README with license information.

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()