Skip to content

Commit

Permalink
Don't raise error when no rwhois results
Browse files Browse the repository at this point in the history
  • Loading branch information
secynic committed Oct 15, 2024
1 parent 1bf8f81 commit c184dde
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ipwhois/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,17 @@ def get_whois(self, asn_registry='arin', retry_count=3, server=None,
'exceeded, wait and try again (possibly a '
'temporary block).'.format(self.address_str))

elif ('error 501' in response or 'error 230' in response
): # pragma: no cover
elif 'error 501' in response: # pragma: no cover

log.debug('WHOIS query error: {0}'.format(response))
raise ValueError

elif 'error 230' in response: # pragma: no cover

# No results found
log.debug('WHOIS query error: {0}'.format(response))
pass

return str(response)

except (socket.timeout, socket.error) as e:
Expand Down

0 comments on commit c184dde

Please sign in to comment.