Skip to content

Commit 654b445

Browse files
add case for unknown country code
1 parent 507ee98 commit 654b445

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

psql/consumers/ASHegemony_prefix.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ 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 in self.continents:
255+
if cc = 'ZZ':
256+
country_name = 'Unknown'
257+
elif cc in self.continents:
256258
country_name = self.continents[cc]
257259
else:
258260
country_name = countries.get(cc).name

0 commit comments

Comments
 (0)