1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

replace str with to_native (#27135)

This commit is contained in:
David Newswanger 2017-07-21 11:32:57 -04:00 committed by Chris Alfonso
parent 08327fa459
commit fd771e580f

View file

@ -137,11 +137,12 @@ from ansible.module_utils.network_common import ComplexList
from ansible.module_utils.netcli import Conditional
from ansible.module_utils.six import string_types
from ansible.module_utils.iosxr import iosxr_argument_spec, check_args
from ansible.module_utils._text import to_native
def to_lines(stdout):
for item in stdout:
if isinstance(item, string_types):
item = str(item).split('\n')
item = to_native(item, errors='surrogate_or_strict').split('\n')
yield item
def parse_commands(module, warnings):