diff --git a/src/ipapi.py b/src/ipapi.py index 9999fc7..5757444 100644 --- a/src/ipapi.py +++ b/src/ipapi.py @@ -37,7 +37,7 @@ def get_ip_info(ip): ip = ip.strip() result = {} - if ip != "": + if ip: result = json.loads(urlopen("http://ip-api.com/json/{}".format(ip)).read()) return result