diff options
author | d3justi <motorockwarrior@gmail.com> | 2016-09-17 14:40:00 -0500 |
---|---|---|
committer | d3justi <motorockwarrior@gmail.com> | 2016-09-17 14:40:00 -0500 |
commit | 261666a01bc36bf176ba90b812bec9d2727e4596 (patch) | |
tree | 7f10dd727c12dfa9fe540438f697b2b8a7f248c5 | |
parent | 07f3b27351e20434a68198a095bd93bdfbf4e589 (diff) | |
download | ansible-261666a01bc36bf176ba90b812bec9d2727e4596.tar.gz |
Removed checks from Nxapi class. D\'oh\!
-rw-r--r-- | lib/ansible/module_utils/nxos.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index b364468bf4..058c0b946f 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -201,20 +201,14 @@ class Nxapi(NxapiConfigMixin): for cmd in commands: if output and output != cmd.output: - try: - responses.extend(self.execute(cmds, output=output)) - except ValueError: - responses.extend(self.execute(cmds)) + responses.extend(self.execute(cmds, output=output)) cmds = list() output = cmd.output cmds.append(str(cmd)) if cmds: - try: - responses.extend(self.execute(cmds, output=output)) - except ValueError: - responses.extend(self.execute(cmds)) + responses.extend(self.execute(cmds, output=output)) return responses @@ -223,10 +217,7 @@ class Nxapi(NxapiConfigMixin): def configure(self, commands): commands = to_list(commands) - try: - return self.execute(commands, output='config') - except ValueError: - return self.execute(commands) + return self.execute(commands, output='config') def _jsonify(self, data): for encoding in ("utf-8", "latin-1"): |