fix plugins/netconf/ce.py for netconf/capability/exchange (#60569)

This commit is contained in:
Xu Yuandong 2019-09-17 14:00:55 +08:00 committed by René Moser
parent 8bc397c229
commit 037401b6e0
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- plugins-netconf-ce - to get attribute 'set-id' from rpc-reply.

View file

@ -167,6 +167,9 @@ class Netconf(NetconfBase):
@ensure_connected
def get(self, *args, **kwargs):
try:
if_rpc_reply = kwargs.pop('if_rpc_reply', False)
if if_rpc_reply:
return self.m.get(*args, **kwargs).xml
return self.m.get(*args, **kwargs).data_xml
except RPCError as exc:
raise Exception(to_xml(exc.xml))