Skip to content

Commit 34b5441

Browse files
committed
fixed xpath duplicate origin
Using a custom origin in the sensor path wasn't split up properly causing the origin to be appended to the first element of the path which led to invalid sensor paths
1 parent 6051075 commit 34b5441

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cisco_gnmi/xr.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,5 +338,6 @@ def parse_xpath_to_gnmi_path(self, xpath, origin=None):
338338
origin = None
339339
else:
340340
# module name
341-
origin = xpath.split(":")[0]
341+
origin, xpath = xpath.split(":")
342+
342343
return super(XRClient, self).parse_xpath_to_gnmi_path(xpath, origin)

0 commit comments

Comments
 (0)