diff options
author | Daniel Gryniewicz <dang@fprintf.net> | 2007-06-30 14:31:05 -0400 |
---|---|---|
committer | Daniel Gryniewicz <dang@fprintf.net> | 2007-06-30 14:31:05 -0400 |
commit | 3ab75337fbfb57ff1fe153df806a3104b75340de (patch) | |
tree | 9b71ec5fe01959c48170269d87cf738c7b4d1191 | |
parent | Change contact name to me (diff) | |
download | gentoo-bumpchecker-3ab75337fbfb57ff1fe153df806a3104b75340de.tar.gz gentoo-bumpchecker-3ab75337fbfb57ff1fe153df806a3104b75340de.tar.bz2 gentoo-bumpchecker-3ab75337fbfb57ff1fe153df806a3104b75340de.zip |
Make it print usage rather than failing for invalid command line options
-rw-r--r-- | modules/clioptions_module.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/clioptions_module.py b/modules/clioptions_module.py index 867a422..4602c20 100644 --- a/modules/clioptions_module.py +++ b/modules/clioptions_module.py @@ -7,7 +7,7 @@ from optparse import OptionParser class Options: def __init__(self): - usage = "usage: %prog [options] arg1 arg2" + usage = "usage: %prog [-qkn] [-o <filename>] -r <release>" self.parser = OptionParser(usage=usage) self.setup_parser() @@ -29,4 +29,6 @@ class Options: help="Check for a minor revision newer than the given one") def get_arguments(self): + if (self.options.release_number == None): + self.parser.error("No revision") return self.options |