Avoid masking an assert failure with a KeyError Exception

This patch does not address the underlying issue as to
why the key was not in the data dictionary, but it serves
the purpose of getting a better error message due to the
failure in meeting the pre-conditions to the test.

Change-Id: I507a34456e8d047728bb7c1d1e5d189e3d00e7c1
Related-bug: #1268274
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index eabc734..4b26b41 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -318,10 +318,13 @@
         returns the ip (floating/internal) of a server
         """
         if floating:
-            return self.floating_ips[server].floating_ip_address
+            server_ip = self.floating_ips[server].floating_ip_address
         else:
+            server_ip = None
             network_name = self.tenants[server.tenant_id].network.name
-            return server.networks[network_name][0]
+            if network_name in server.networks:
+                server_ip = server.networks[network_name][0]
+        return server_ip
 
     def _connect_to_access_point(self, tenant):
         """