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:
parent
08327fa459
commit
fd771e580f
1 changed files with 2 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue