Fix iteritems for py3

This commit is contained in:
Kirk Byers committed 2017-01-11 17:59:39 -08:00
1 parent 8a1779b10a
commit f9d7bd0aa9
1 file changed
+2 -2
+2 -2
View File
@@ -328,7 +328,7 @@ class FortiOSDriver(NetworkDriver):
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)]
@@ -358,7 +358,7 @@ class FortiOSDriver(NetworkDriver):
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