exception when gateway has no location
it is valid for a provider to not specify locations for any of their vpn gateways, but bitmask doesn't like it:
2015-07-18 17:14:23,098 - ERROR - L#253 : leap.bitmask.backend.backend:_done_action() - There was a failure - > 2015-07-18 17:14:23,098 - ERROR - L#254 : leap.bitmask.backend.backend:_done_action() - Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap self.__bootstrap_inner() File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) --- --- File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/lib/python2.7/dist-packages/leap/bitmask/backend/backend.py", line 228, in method = lambda: func(**kwargs) File "/usr/lib/python2.7/dist-packages/leap/bitmask/backend/leapbackend.py", line 273, in eip_get_gateway_country_code self._eip.get_gateway_country_code(domain) File "/usr/lib/python2.7/dist-packages/leap/bitmask/backend/components.py", line 629, in get_gateway_country_code gateway_ccode = ccodes[gateways[0]] exceptions.KeyError: u'200.25.22.63'
for example, this eip-service.json:
{ "gateways": [ { "capabilities": { "adblock": false, "filter_dns": false, "limited": false, "ports": [ "1194", "443", "53", "80" ], "protocols": [ "tcp", "udp" ], "transport": [ "openvpn" ], "user_ips": false }, "host": "leapvpn.colnodo.org", "ip_address": "200.25.22.63" } ], "locations": {}, "openvpn_configuration": { "auth": "SHA1", "cipher": "AES-128-CBC", "keepalive": "10 30", "tls-cipher": "DHE-RSA-AES128-SHA", "tun-ipv6": true }, "serial": 1, "version": 1 }
(from redmine: created on 2015-07-19, closed on 2015-08-24)