except on ASN lookups

This commit is contained in:
Nikolay Shopik 2017-05-15 14:11:19 +03:00
parent 1f18a128e2
commit 988e0e7455

View File

@ -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():