Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pyntc/devices/ios_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,8 @@ def peer_redundancy_state(self):
log.error("Host %s: Command error for command 'show redundancy'.", self.host)
return None
re_show_redundancy = RE_SHOW_REDUNDANCY.match(show_redundancy.lstrip())
if not re_show_redundancy:
return None
processor_redundancy_info = re_show_redundancy.group("other")
if processor_redundancy_info is not None:
re_redundancy_state = RE_REDUNDANCY_STATE.search(processor_redundancy_info)
Expand Down Expand Up @@ -905,6 +907,8 @@ def redundancy_mode(self):
log.error("Host %s: Command error for command 'show redundancy'.", self.host)
return "n/a"
re_show_redundancy = RE_SHOW_REDUNDANCY.match(show_redundancy.lstrip())
if not re_show_redundancy:
return None
redundancy_info = re_show_redundancy.group("info")
re_redundancy_mode = RE_REDUNDANCY_OPERATION_MODE.search(redundancy_info)
redundancy_mode = re_redundancy_mode.group(1).lower()
Expand Down Expand Up @@ -932,6 +936,8 @@ def redundancy_state(self):
log.error("Host %s: Command error for command 'show redundancy'.", self.host)
return None
re_show_redundancy = RE_SHOW_REDUNDANCY.match(show_redundancy.lstrip())
if not re_show_redundancy:
return None
processor_redundancy_info = re_show_redundancy.group("self")
re_redundancy_state = RE_REDUNDANCY_STATE.search(processor_redundancy_info)
processor_redundancy_state = re_redundancy_state.group(1).lower()
Expand Down