fix ipinfodb when no coordinates are given from web server
This commit is contained in:
parent
c55ccd4ee4
commit
2f07993c97
1 changed files with 1 additions and 4 deletions
|
|
@ -78,10 +78,7 @@ class IpinfodbBackend(BaseBackend, ICapGeolocIp):
|
|||
iploc.lt = float(tab['Latitude'])
|
||||
iploc.lg = float(tab['Longitude'])
|
||||
except ValueError:
|
||||
if len(tab['Latitude']) == 0 or len(tab['Longitude']) == 0:
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
pass
|
||||
iploc.host = tab['hostname']
|
||||
iploc.tld = tab['hostname'].split('.')[-1]
|
||||
#iploc.isp = 'NA'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue