commit 3ae947b87863a228ac162934471a4a81923f07dd Author: Arturo Filastò art@fuffa.org Date: Fri May 17 20:03:41 2013 +0200
Strip superflous data from ASN number
Fixes bug in validating ASN in backend (thank kheops for reporting it). --- ooni/geoip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ooni/geoip.py b/ooni/geoip.py index 1e6f6e9..875ed07 100644 --- a/ooni/geoip.py +++ b/ooni/geoip.py @@ -36,7 +36,7 @@ def IPToLocation(ipaddr): location['countrycode'] = country_dat.country_code_by_addr(ipaddr)
asn_dat = GeoIP(asn_file) - location['asn'] = asn_dat.org_by_addr(ipaddr) + location['asn'] = asn_dat.org_by_addr(ipaddr).split(' ')[0]
except IOError: log.err("Could not find GeoIP data files. Go into data/ "