py3: use function next() instead of next() method on iterator objects
Python 3 introduced a next() function to replace the next() method on iterator objects. Change-Id: If30f3a870bf590fe9d1a8bb5af54cba67be012da
This commit is contained in:
parent
04b4737fbb
commit
46f9ba1706
|
@ -380,13 +380,13 @@ class IpRouteCommand(IpDeviceCommandBase):
|
||||||
'match', subnet).split('\n')
|
'match', subnet).split('\n')
|
||||||
for subnet_route_line in subnet_route_list_lines:
|
for subnet_route_line in subnet_route_list_lines:
|
||||||
i = iter(subnet_route_line.split())
|
i = iter(subnet_route_line.split())
|
||||||
while(i.next() != 'dev'):
|
while(next(i) != 'dev'):
|
||||||
pass
|
pass
|
||||||
device = i.next()
|
device = next(i)
|
||||||
try:
|
try:
|
||||||
while(i.next() != 'src'):
|
while(next(i) != 'src'):
|
||||||
pass
|
pass
|
||||||
src = i.next()
|
src = next(i)
|
||||||
except:
|
except:
|
||||||
src = ''
|
src = ''
|
||||||
if device != interface_name:
|
if device != interface_name:
|
||||||
|
|
Loading…
Reference in New Issue