Fix bug 1167 10/9610/1
authorDavid Garcia <david.garcia@canonical.com>
Wed, 22 Jul 2020 11:17:56 +0000 (13:17 +0200)
committerDavid Garcia <david.garcia@canonical.com>
Thu, 20 Aug 2020 09:47:32 +0000 (11:47 +0200)
Change-Id: Id0ea5f19d57d2214219eec8f59f13a378d61c870
Signed-off-by: David Garcia <david.garcia@canonical.com>
n2vc/kubectl.py

index 9d4ce57..61b2dc3 100644 (file)
@@ -46,7 +46,9 @@ class Kubectl:
                             "target_port": p.target_port,
                         }
                         for p in i.spec.ports
-                    ],
+                    ]
+                    if i.spec.ports
+                    else [],
                     "external_ip": [i.ip for i in i.status.load_balancer.ingress]
                     if i.status.load_balancer.ingress
                     else None,