Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #143 from mekisiel/develop
Browse files Browse the repository at this point in the history
Fix for #104.
  • Loading branch information
mirceaulinic committed Oct 24, 2017
2 parents c254402 + e1e6d86 commit 5dbc0e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion napalm_iosxr/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ def get_facts(self):
system_time_xpath = './/SystemTime/Uptime'
platform_attr_xpath = './/RackTable/Rack/Attributes/BasicInfo'
system_time_tree = facts_rpc_reply.xpath(system_time_xpath)[0]
platform_attr_tree = facts_rpc_reply.xpath(platform_attr_xpath)[0]
try:
platform_attr_tree = facts_rpc_reply.xpath(platform_attr_xpath)[0]
except IndexError:
platform_attr_tree = facts_rpc_reply.xpath(platform_attr_xpath)

hostname = napalm_base.helpers.convert(
text_type, napalm_base.helpers.find_txt(system_time_tree, 'Hostname'))
Expand Down

0 comments on commit 5dbc0e7

Please sign in to comment.