summaryrefslogtreecommitdiffstats
path: root/bugzilla
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2007-12-12 17:24:23 -0500
committerWill Woods <wwoods@redhat.com>2007-12-12 17:24:23 -0500
commit017c7f061471f2985f29169514778d5f903ff74c (patch)
treeb7449dc03de0a8d63ea2b48e1ab772f93e7412f2 /bugzilla
parentb78fe3ed430521033a08a63360ecd0a42efa092a (diff)
downloadpython-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-xbugzilla14
1 files changed, 14 insertions, 0 deletions
diff --git a/bugzilla b/bugzilla
index 3c89138..d2e2f65 100755
--- a/bugzilla
+++ b/bugzilla
@@ -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