From 51f35674cae94d8bfeb0f20bcf89b83c9db409f8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 3 Jul 2012 13:11:09 +0200 Subject: [PATCH] Removing obsolete switch --version as version is now displayed with every run (Issue #54) --- lib/parse/cmdline.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 167af4746..83e29cd46 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -28,7 +28,7 @@ def cmdLineParser(): usage = "%s%s [options]" % ("python " if not IS_WIN else "", \ "\"%s\"" % sys.argv[0] if " " in sys.argv[0] else sys.argv[0]) - parser = OptionParser(usage=usage, version=VERSION_STRING) + parser = OptionParser(usage=usage) try: parser.add_option("--hh", dest="advancedHelp", @@ -676,10 +676,9 @@ def cmdLineParser(): option._short_opts = ["-hh"] option._long_opts = [] - # Dirty hack for inherent help messages of switches --version and -h - for option in ('-h', '--version'): - _ = parser.get_option(option) - _.help = _.help.capitalize().replace("this help", "basic help") + # Dirty hack for inherent help message of switch -h + option = parser.get_option("-h") + option.help = option.help.capitalize().replace("this help", "basic help") args = [] advancedHelp = True