mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Netconf bytes fixes (#41607)
* Solve some bytes issues on iosxr * Solve some bytes issues in junos * Do the correct thing with tostring based on lxml or not
This commit is contained in:
@@ -109,7 +109,7 @@ class NetconfConnection(Connection):
|
||||
|
||||
|
||||
def transform_reply():
|
||||
reply = '''<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
return b'''<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" indent="no"/>
|
||||
|
||||
<xsl:template match="/|comment()|processing-instruction()">
|
||||
@@ -131,10 +131,6 @@ def transform_reply():
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
'''
|
||||
if sys.version < '3':
|
||||
return reply
|
||||
else:
|
||||
return reply.encode('UTF-8')
|
||||
|
||||
|
||||
# Note: Workaround for ncclient 0.5.3
|
||||
|
||||
Reference in New Issue
Block a user