From 0f7279b967acb27edb75e6a480820a4cbdcf1f3a Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Wed, 17 Feb 2016 13:47:41 +0000 Subject: [PATCH] bugfix for missing function name in ios_command This provides a minor bugfix for a missing function name in the ios_command network module --- lib/ansible/modules/network/ios/ios_command.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/ansible/modules/network/ios/ios_command.py b/lib/ansible/modules/network/ios/ios_command.py index 9c79e774bda..54ec3bf015c 100644 --- a/lib/ansible/modules/network/ios/ios_command.py +++ b/lib/ansible/modules/network/ios/ios_command.py @@ -108,18 +108,12 @@ failed_conditions: import time import shlex import re -import json - -INDEX_RE = re.compile(r'(\[\d+\])') - - -def get_response(data): - try: - json_data = json.loads(data) - except ValueError: - json_data = None - return dict(data=data, json=json_data) +def to_lines(stdout): + for item in stdout: + if isinstance(item, basestring): + item = str(item).split('\n') + yield item def main(): spec = dict(