mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
bugfix for missing function name in ios_command
This provides a minor bugfix for a missing function name in the ios_command network module
This commit is contained in:
parent
aaf762573e
commit
0f7279b967
1 changed files with 5 additions and 11 deletions
|
@ -108,18 +108,12 @@ failed_conditions:
|
||||||
import time
|
import time
|
||||||
import shlex
|
import shlex
|
||||||
import re
|
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():
|
def main():
|
||||||
spec = dict(
|
spec = dict(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue