mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
Fix junos_command py3 related issues (#36782)
Fixes #36204 * tostring() input string shoulb be in byte string format * to_ele() input is required in unicode format
This commit is contained in:
parent
2fbfce06e7
commit
41d75783b5
4 changed files with 7 additions and 6 deletions
|
@ -50,7 +50,7 @@ class Netconf(NetconfBase):
|
|||
device_info['network_os'] = 'junos'
|
||||
ele = new_ele('get-software-information')
|
||||
data = self.execute_rpc(to_xml(ele))
|
||||
reply = to_ele(to_bytes(data, errors='surrogate_or_strict'))
|
||||
reply = to_ele(data)
|
||||
sw_info = reply.find('.//software-information')
|
||||
|
||||
device_info['network_os_version'] = self.get_text(sw_info, 'junos-version')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue