mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07: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:
parent
c144adc9de
commit
9aa8c652ba
23 changed files with 54 additions and 113 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue