From fd771e580f2242201d64cc3b07cc1e0b5fe5e313 Mon Sep 17 00:00:00 2001 From: David Newswanger Date: Fri, 21 Jul 2017 11:32:57 -0400 Subject: [PATCH] replace str with to_native (#27135) --- lib/ansible/modules/network/iosxr/iosxr_command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/iosxr/iosxr_command.py b/lib/ansible/modules/network/iosxr/iosxr_command.py index 1c4ba2731a0..70bc429cf25 100644 --- a/lib/ansible/modules/network/iosxr/iosxr_command.py +++ b/lib/ansible/modules/network/iosxr/iosxr_command.py @@ -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):