diff options
author | Will Woods <wwoods@redhat.com> | 2007-12-12 17:24:23 -0500 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2007-12-12 17:24:23 -0500 |
commit | 017c7f061471f2985f29169514778d5f903ff74c (patch) | |
tree | b7449dc03de0a8d63ea2b48e1ab772f93e7412f2 /bugzilla | |
parent | b78fe3ed430521033a08a63360ecd0a42efa092a (diff) | |
download | python-bugzilla-017c7f061471f2985f29169514778d5f903ff74c.tar.gz python-bugzilla-017c7f061471f2985f29169514778d5f903ff74c.tar.xz python-bugzilla-017c7f061471f2985f29169514778d5f903ff74c.zip |
more work on modify, fix optparsing
Diffstat (limited to 'bugzilla')
-rwxr-xr-x | bugzilla | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -41,6 +41,7 @@ def setup_parser(): u = "usage: %prog [global options] COMMAND [options]" u += "\nCommands: %s" % ', '.join(cmdlist) p = optparse.OptionParser(usage=u) + p.disable_interspersed_args() # General bugzilla connection options p.add_option('--bugzilla',default=default_bz, help="bugzilla XMLRPC URI. default: %s" % default_bz) @@ -239,6 +240,19 @@ if __name__ == '__main__': b = bz.createbug(**data) buglist = [b] + elif action == 'modify': + buglist = [] + for a in args: + if ',' in a: + for b in a.split(','): + buglist.append(b) + else: + buglist.append(a) + # Surely there's a simpler way to do that.. + print "Sorry, modify isn't done yet." + print "opt: %s" % str(opt) + print "buglist: %s" % str(buglist) + else: print "Sorry - '%s' not implemented yet." % action |