Skip to content

Commit

Permalink
Fix iteritems for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Jan 12, 2017
1 parent 8a1779b commit f9d7bd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions napalm_fortios/fortios.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def get_bgp_neighbors(self):

self.device.load_config('router bgp')

for neighbor, parameters in neighbors.iteritems():
for neighbor, parameters in neighbors.items():
logger.debug('NEW PEER')
neigh_conf = self.device.running_config['router bgp']['neighbor']['{}'.format(neighbor)]

Expand Down Expand Up @@ -358,7 +358,7 @@ def get_bgp_neighbors(self):
x = detail_output.index(' for address family: {} unicast'.format(family))
block = detail_output[x:]

for term, fortiname in terms.iteritems():
for term, fortiname in terms.items():
text = self._search_line_in_lines('%s prefixes' % fortiname, block)
t = [int(s) for s in text.split() if s.isdigit()][0]
neighbor_dict['address_family'][family][term] = t
Expand Down

0 comments on commit f9d7bd0

Please sign in to comment.