Show version without supplying a dummy action

fixes #12004
parsing x2 does not seem to break anything
This commit is contained in:
muffl0n 2015-08-20 10:31:48 +02:00 committed by Brian Coca
parent ab536c8aa8
commit 21775d7866
2 changed files with 8 additions and 2 deletions

View file

@ -50,7 +50,7 @@ class GalaxyCLI(CLI):
SKIP_INFO_KEYS = ("name", "description", "readme_html", "related", "summary_fields", "average_aw_composite", "average_aw_score", "url" )
VALID_ACTIONS = ("delete", "import", "info", "init", "install", "list", "login", "remove", "search", "setup")
def __init__(self, args):
self.api = None
self.galaxy = None
@ -64,6 +64,9 @@ class GalaxyCLI(CLI):
epilog = "\nSee '%s <command> --help' for more information on a specific command.\n\n" % os.path.basename(sys.argv[0])
)
# Workaround for #12004: show version without supplying a dummy action
self.parser.parse_args()
self.set_action()
# options specific to actions
@ -141,7 +144,7 @@ class GalaxyCLI(CLI):
return True
def run(self):
super(GalaxyCLI, self).run()
# if not offline, get connect to galaxy api

View file

@ -53,6 +53,9 @@ class VaultCLI(CLI):
epilog = "\nSee '%s <command> --help' for more information on a specific command.\n\n" % os.path.basename(sys.argv[0])
)
# Workaround for #12004: show version without supplying a dummy action
self.parser.parse_args()
self.set_action()
# options specific to self.actions