Nested loop breaking out doesn't handle correctly
Bug #1659169 reported by
Zhenguo Niu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Wishlist
|
Zhenguo Niu |
Bug Description
https:/
for p in ports:
for ip in p['fixed_ips']:
if ip['ip_address'] == address:
port_id = p['id']
break
in the above nested loops, when we find the port_id, it just break one for loop, the outside loop will continue, it's a bit waste, should handle this gracefully.
Changed in nova: | |
assignee: | nobody → Zhenguo Niu (niu-zglinux) |
status: | New → In Progress |
To post a comment you must log in.
There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.