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

Commit

Permalink
Merge pull request #188 from afourmy/master
Browse files Browse the repository at this point in the history
fix bug when bgp is not active
  • Loading branch information
ktbyers authored Aug 18, 2017
2 parents 81a69f8 + 030d214 commit 61adc4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions napalm_ios/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,10 @@ def get_bgp_neighbors(self):
cmd_bgp_all_sum = 'show bgp all summary'
summary_output = self._send_command(cmd_bgp_all_sum).strip()

# if BGP is not active, there are no neighbors
if not summary_output or 'BGP not active' in summary_output:
return {'global': {}}

# get neighbor output from device
neighbor_output = ''
for afi in supported_afi:
Expand Down

0 comments on commit 61adc4d

Please sign in to comment.