fix exception

This commit is contained in:
j 2020-05-30 13:57:34 +02:00
parent fa5cf7cf60
commit 23c7a683a8

View file

@ -1,4 +1,4 @@
from django.contrib.gis.geoip2 import GeoIP2 from django.contrib.gis.geoip2 import GeoIP, GeoIP2Exception2
import ox import ox
@ -22,7 +22,7 @@ def get_location(ip):
else: else:
try: try:
location = g.city(ip) location = g.city(ip)
except django.contrib.gis.geoip2.GeoIP2Exception: except GeoIP2Exception:
try: try:
location = g.country(s.ip) location = g.country(s.ip)
except: except: