From 16742d4705e6a349778d8e6137a6a62416a1244b Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 24 Nov 2019 11:32:11 -0800 Subject: [PATCH] Patch ipwhois literal comparison --- lib/ipwhois/whois.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ipwhois/whois.py b/lib/ipwhois/whois.py index 882dd908..f8384e45 100644 --- a/lib/ipwhois/whois.py +++ b/lib/ipwhois/whois.py @@ -474,7 +474,7 @@ class Whois: for addr in net_range.split(', '): count = addr.count('.') - if count is not 0 and count < 4: + if count != 0 and count < 4: addr_split = addr.strip().split('/') for i in range(count + 1, 4): @@ -667,7 +667,7 @@ class Whois: # Only fetch the response if we haven't already. if response is None or (not is_offline and - asn_data['asn_registry'] is not 'arin'): + asn_data['asn_registry'] != 'arin'): log.debug('Response not given, perform WHOIS lookup for {0}' .format(self._net.address_str))