skip invalid routers
diff --git a/planetstack/openstack/driver.py b/planetstack/openstack/driver.py
index c01fede..15ea3f5 100644
--- a/planetstack/openstack/driver.py
+++ b/planetstack/openstack/driver.py
@@ -264,7 +264,7 @@
gw_port = port
router_id = gw_port['device_id']
router = self.shell.quantum.show_router(router_id)['router']
- if router:
+ if router and router.get('external_gateway_info'):
ext_net = router['external_gateway_info']['network_id']
for port in ports:
if port['device_id'] == router_id and port['network_id'] == ext_net: