From 988e0e745551b14933299c8a1e33fda14768bef8 Mon Sep 17 00:00:00 2001 From: Nikolay Shopik Date: Mon, 15 May 2017 14:11:19 +0300 Subject: [PATCH] except on ASN lookups --- blockcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockcheck.py b/blockcheck.py index 3bd7263..490d6a3 100755 --- a/blockcheck.py +++ b/blockcheck.py @@ -808,7 +808,7 @@ def get_ispinfo(ipaddr): rdap_response = IPWhois(ipaddr) ispinfo = rdap_response.lookup_rdap(depth=1) return ispinfo['asn'] - except: + except(ipwhois.exceptions.ASNRegistryError, ipwhois.exceptions.ASNLookupError, ASNParseError, ASNOriginLookupError): return False def main():