Skip to content

Commit 1c96c03

Browse files
add case for unknown country code
1 parent b14c6ca commit 1c96c03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

psql/consumers/geolite_city.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ def lookup(self, ip):
5454
except geoip2.errors.AddressNotFoundError:
5555
pass
5656

57+
if cc is None:
58+
cc = "ZZ"
59+
5760
return cc
5861

5962

0 commit comments

Comments
 (0)