# extract the version
# First try the tag present in >= 15.1
swinfo = rsp.xpath('.//junos-version')[0].text
if not swinfo:
# For < 15.1, get version from the "junos" package.
pkginfo = rsp.xpath(
and when run this gives me an error:
fatal: [hostname]: FAILED! => {"changed": false, "failed": true, "msg": "list index out of range"}
I have changed my local 'python2.7/site-packages/netconify/facts.py' file to represent the current code at line 22 and this now functions correctly for me.
# extract the version
# First try the tag present in >= 15.1
swinfo = rsp.findtext('junos-version', default=None)
if not swinfo:
# For < 15.1, get version from the "junos" package.
pkginfo = rsp.xpath(
The package for py-junos-netconify at https://pypi.python.org/pypi/junos-netconify/1.0.2 has the following code (specifically line 22) in facts.py:
and when run this gives me an error:
I have changed my local 'python2.7/site-packages/netconify/facts.py' file to represent the current code at line 22 and this now functions correctly for me.
kind regards,