From eb4ab5fa2aa503ede5f9bf20cd4f5a190c95f777 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 7 Jan 2016 08:27:13 -0500 Subject: [PATCH] Revert "Show version without supplying a dummy action" This reverts commit 11b55be5bbb90b2bc917b2637d6fcdbe1a15092d. Parsing before action will fail if one of the action specific options is used As per issue #13743 --- lib/ansible/cli/galaxy.py | 7 ++----- lib/ansible/cli/vault.py | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py index a022d17859c..476a7d0f897 100644 --- a/lib/ansible/cli/galaxy.py +++ b/lib/ansible/cli/galaxy.py @@ -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,9 +64,6 @@ class GalaxyCLI(CLI): epilog = "\nSee '%s --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 @@ -144,7 +141,7 @@ class GalaxyCLI(CLI): return True def run(self): - + super(GalaxyCLI, self).run() # if not offline, get connect to galaxy api diff --git a/lib/ansible/cli/vault.py b/lib/ansible/cli/vault.py index 50a6fdebdc8..9908f17e578 100644 --- a/lib/ansible/cli/vault.py +++ b/lib/ansible/cli/vault.py @@ -53,9 +53,6 @@ class VaultCLI(CLI): epilog = "\nSee '%s --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