From da7a4b59a4144ac137f0651a687e8504cc7a2f87 Mon Sep 17 00:00:00 2001 From: Maysa Macedo Date: Thu, 23 Jun 2022 12:59:46 +0200 Subject: [PATCH] Fix Ports len calculation on Networks cleanup Generator doesn't have lenght available, so we must convert it to list instead. Change-Id: Ia979894de405bba83952284a1df714753d62494b --- kuryr_kubernetes/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kuryr_kubernetes/utils.py b/kuryr_kubernetes/utils.py index 84916dc6a..0a9c7627c 100644 --- a/kuryr_kubernetes/utils.py +++ b/kuryr_kubernetes/utils.py @@ -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)