Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 51f3567

Browse files
committed
Removing obsolete switch --version as version is now displayed with every run (Issue #54)
1 parent 481b46a commit 51f3567

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

lib/parse/cmdline.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def cmdLineParser():
2828
usage = "%s%s [options]" % ("python " if not IS_WIN else "", \
2929
"\"%s\"" % sys.argv[0] if " " in sys.argv[0] else sys.argv[0])
3030

31-
parser = OptionParser(usage=usage, version=VERSION_STRING)
31+
parser = OptionParser(usage=usage)
3232

3333
try:
3434
parser.add_option("--hh", dest="advancedHelp",
@@ -676,10 +676,9 @@ def cmdLineParser():
676676
option._short_opts = ["-hh"]
677677
option._long_opts = []
678678

679-
# Dirty hack for inherent help messages of switches --version and -h
680-
for option in ('-h', '--version'):
681-
_ = parser.get_option(option)
682-
_.help = _.help.capitalize().replace("this help", "basic help")
679+
# Dirty hack for inherent help message of switch -h
680+
option = parser.get_option("-h")
681+
option.help = option.help.capitalize().replace("this help", "basic help")
683682

684683
args = []
685684
advancedHelp = True

0 commit comments

Comments
 (0)