Fix Ports len calculation on Networks cleanup

Generator doesn't have lenght available, so
we must convert it to list instead.

Change-Id: Ia979894de405bba83952284a1df714753d62494b
This commit is contained in:
Maysa Macedo 2022-06-23 12:59:46 +02:00
parent 5af8716960
commit da7a4b59a4

View File

@ -809,7 +809,7 @@ def cleanup_dead_networks():
'"%s": %s', subnet, ex)
continue
if len(os_net.ports(network_id=net.id)) > 0:
if len(list(os_net.ports(network_id=net.id))) > 0:
continue
now = timeutils.utcnow(True)