~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to admin/update-bug-status

  • Committer: Duncan McGreggor
  • Date: 2009-09-15 21:12:04 UTC
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: duncan@canonical.com-20090915211204-dc2lkgzlddg4v8ps
Updated unit tests for latest changes.

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