~tribaal/txaws/xss-hardening

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python2.7
import os
import sys

from launchpadlib.launchpad import Launchpad

import base


def dispatch():
    client = base.Client(name="txAWS Bug Updater")
    begin_state, end_state = sys.argv[1:]
    try:
        bugs = client.state_map["begin_state"][begin_state]()
    except KeyError:
        raise base.UnknownState("Beginning state given: %s" % begin_state)
    try:
        client.state_map["end_state"][end_state](bugs)
    except KeyError:
        raise base.UnknownState("Ending state given: %s" % end_state)


if __name__ == "__main__":
    dispatch()