mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Fix missing country in whois lookup causing error
This commit is contained in:
parent
66167d5960
commit
9d08717c83
1 changed files with 1 additions and 1 deletions
|
@ -646,7 +646,7 @@ def whois_lookup(ip_address):
|
|||
countries = ipwhois.utils.get_countries()
|
||||
nets = whois['nets']
|
||||
for net in nets:
|
||||
net['country'] = countries[net['country']]
|
||||
net['country'] = countries.get(net['country'])
|
||||
if net['postal_code']:
|
||||
net['postal_code'] = net['postal_code'].replace('-', ' ')
|
||||
except ValueError as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue