Skip to content

Commit

Permalink
Merge pull request #1339 from dineshbaburam91/issue_1254
Browse files Browse the repository at this point in the history
Fixed error handling on HelloHandler
  • Loading branch information
chidanandpujar authored Oct 23, 2024
2 parents d0c0947 + 719f539 commit 30daef3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/jnpr/junos/transport/tty_netconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def open(self, at_shell):
raise RuntimeError("Error: netconf not responding")

self.hello = self._receive()
self._session_id, _ = HelloHandler.parse(self.hello.decode("utf-8"))
self._session_id, _ = HelloHandler.parse(
self.hello.decode("utf-8") if isinstance(self.hello, bytes) else self.hello
)

def close(self, force=False):
"""issue the XML API to close the session"""
Expand Down

0 comments on commit 30daef3

Please sign in to comment.