Change-Id: I3e7788c36971b132ab685dd55600a449aa1d5128
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
     for port in ports:
         if port['network_id'] in network_ids:
             port_id = port['id']
-            subnet_id = port['fixed_ips'][0]['subnet_id']
+            try:
+                subnet_id = port['fixed_ips'][0]['subnet_id']
+            except:
+                logger.info("  > ERROR: Error removing port %s." % port_id)
+                print port
+                print ports
+                continue
+
             router_id = port['device_id']
             if port['device_owner'] == 'network:router_interface':
                 logger.debug("Detaching port %s (subnet %s) from router %s ..."