From 05e5474c52490c2fed77bb8b055294997fc2341f Mon Sep 17 00:00:00 2001 From: Patrick Ogenstad Date: Mon, 12 Dec 2016 21:55:22 +0100 Subject: [PATCH] Disable CLI errors when typing enable (#18531) --- lib/ansible/module_utils/asa.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/module_utils/asa.py b/lib/ansible/module_utils/asa.py index e65426c52b..c5d913c8e9 100644 --- a/lib/ansible/module_utils/asa.py +++ b/lib/ansible/module_utils/asa.py @@ -62,8 +62,13 @@ class Cli(CliBase): def authorize(self, params, **kwargs): passwd = params['auth_pass'] + errors = self.shell.errors + # Disable errors (if already in enable mode) + self.shell.errors = [] cmd = Command('enable', prompt=self.NET_PASSWD_RE, response=passwd) self.execute([cmd, 'no terminal pager']) + # Reapply error handling + self.shell.errors = errors def change_context(self, params): context = params['context']