Skip to content

Commit b14c6ca

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

psql/consumers/ASHegemony_prefix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ def save(self, msg):
252252
# Add country in psql if needed
253253
if cc not in self.countries:
254254
self.countries.add(cc)
255-
if cc == 'ZZ':
255+
if cc == 'ZZ' or cc is None:
256+
cc = 'ZZ'
256257
country_name = 'Unknown'
257258
elif cc in self.continents:
258259
country_name = self.continents[cc]

0 commit comments

Comments
 (0)