Skip to content

Commit

Permalink
Merge pull request #75 from ipinfo/umar/fix-empty-ipaddress
Browse files Browse the repository at this point in the history
ip_address empty check
  • Loading branch information
UmanShahzad authored Nov 24, 2022
2 parents a003e43 + f0d269d commit 3e9e00e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ipinfo/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def getDetails(self, ip_address=None, timeout=None):
ip_address = ip_address.exploded

# check if bogon.
if is_bogon(ip_address):
if ip_address and is_bogon(ip_address):
details = {}
details["ip"] = ip_address
details["bogon"] = True
Expand Down
2 changes: 1 addition & 1 deletion ipinfo/handler_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async def getDetails(self, ip_address=None, timeout=None):
ip_address = ip_address.exploded

# check if bogon.
if is_bogon(ip_address):
if ip_address and is_bogon(ip_address):
details = {}
details["ip"] = ip_address
details["bogon"] = True
Expand Down

0 comments on commit 3e9e00e

Please sign in to comment.