Merge "py3: use function next() instead of next() method on iterator objects"

This commit is contained in:
Jenkins 2016-03-17 21:45:43 +00:00 committed by Gerrit Code Review
commit 3d96794fd7

View File

@ -380,13 +380,13 @@ class IpRouteCommand(IpDeviceCommandBase):
'match', subnet).split('\n')
for subnet_route_line in subnet_route_list_lines:
i = iter(subnet_route_line.split())
while(i.next() != 'dev'):
while(next(i) != 'dev'):
pass
device = i.next()
device = next(i)
try:
while(i.next() != 'src'):
while(next(i) != 'src'):
pass
src = i.next()
src = next(i)
except:
src = ''
if device != interface_name: