@ -159,6 +159,7 @@ except ImportError:
from ansible . module_utils . basic import AnsibleModule
from ansible . module_utils . basic import AnsibleModule
from ansible . module_utils . network . netconf . netconf import get_capabilities , locked_config , get_config , get
from ansible . module_utils . network . netconf . netconf import get_capabilities , locked_config , get_config , get
from ansible . module_utils . network . common . netconf import remove_namespaces
from ansible . module_utils . network . common . netconf import remove_namespaces
from ansible . module_utils . _text import to_text
try :
try :
import jxmlease
import jxmlease
@ -235,7 +236,7 @@ def main():
else :
else :
response = get ( module , filter_spec , execute_lock )
response = get ( module , filter_spec , execute_lock )
xml_resp = to string( response )
xml_resp = to _text( to string( response ) )
output = None
output = None
if display == ' xml ' :
if display == ' xml ' :
@ -246,7 +247,7 @@ def main():
except Exception :
except Exception :
raise ValueError ( xml_resp )
raise ValueError ( xml_resp )
elif display == ' pretty ' :
elif display == ' pretty ' :
output = to string( response , pretty_print = True )
output = to _text( to string( response , pretty_print = True ) )
result = {
result = {
' stdout ' : xml_resp ,
' stdout ' : xml_resp ,