[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/develop] Strip superflous data from ASN number
commit 3ae947b87863a228ac162934471a4a81923f07dd
Author: Arturo Filastò <art@xxxxxxxxx>
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/ "
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits