summaryrefslogtreecommitdiff
path: root/src/leap/eip/config.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-10-20 07:13:22 +0900
committerkali <kali@leap.se>2012-10-20 07:13:22 +0900
commita85e488ed323ba35b9d12c5cc344bf06337a9a00 (patch)
tree548caec9f0e8c66e88bf5a67cf36ba2254e3e0f1 /src/leap/eip/config.py
parentf791a83ce57cef7010da819d61e7f5132fa4611e (diff)
add bypass for already trusted fingerprints
Diffstat (limited to 'src/leap/eip/config.py')
-rw-r--r--src/leap/eip/config.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/leap/eip/config.py b/src/leap/eip/config.py
index ef0f52b4..1ce4a54e 100644
--- a/src/leap/eip/config.py
+++ b/src/leap/eip/config.py
@@ -78,8 +78,15 @@ def get_eip_gateway():
return placeholder
if len(gateways) > 0:
for gw in gateways:
- if gw['name'] == primary_gateway:
- hosts = gw['hosts']
+ name = gw.get('name', None)
+ if not name:
+ return
+
+ if name == primary_gateway:
+ hosts = gw.get('hosts', None)
+ if not hosts:
+ logger.error('no hosts')
+ return
if len(hosts) > 0:
return hosts[0]
else: