Skip to content

Commit 719f539

Browse files
Fixed error handling on HelloHandler
1 parent 006ec44 commit 719f539

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/jnpr/junos/transport/tty_netconf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ def open(self, at_shell):
6868
raise RuntimeError("Error: netconf not responding")
6969

7070
self.hello = self._receive()
71-
self._session_id, _ = HelloHandler.parse(self.hello.decode("utf-8"))
71+
self._session_id, _ = HelloHandler.parse(
72+
self.hello.decode("utf-8") if isinstance(self.hello, bytes) else self.hello
73+
)
7274

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

0 commit comments

Comments
 (0)