diff --git a/lib/jnpr/junos/transport/tty_netconf.py b/lib/jnpr/junos/transport/tty_netconf.py index 1d5133de4..593c9b9f9 100644 --- a/lib/jnpr/junos/transport/tty_netconf.py +++ b/lib/jnpr/junos/transport/tty_netconf.py @@ -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"""