Skip to content

Commit

Permalink
log details about failed hello message
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-sahlmann committed Jul 1, 2022
1 parent b862b0a commit 0d1ea7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mb_netmgmt/netconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with mb-netmgmt. If not, see <https://www.gnu.org/licenses/

import logging
from socketserver import BaseRequestHandler
from socketserver import TCPServer as Server

Expand All @@ -30,7 +31,7 @@
SessionListener,
qualify,
sub_ele,
to_ele
to_ele,
)
from ncclient.transport.ssh import MSG_DELIM, PORT_NETCONF_DEFAULT, SSHSession

Expand Down Expand Up @@ -86,7 +87,7 @@ def init_cb(id, capabilities):
if "urn:ietf:params:netconf:base:1.1" in capabilities:
self.session._base = NetconfBase.BASE_11

self.session.add_listener(HelloHandler(init_cb, None))
self.session.add_listener(HelloHandler(init_cb, logging.error))

def read_proxy_response(self):
return {"rpc-reply": unwrap_proxy_response(self.rpc_reply._root)}
Expand Down

0 comments on commit 0d1ea7b

Please sign in to comment.