From d20b90393f6f0ed005f6feb9708001aa643b1f48 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sat, 15 Oct 2022 10:13:25 +0200 Subject: [PATCH] chg: [country_lookup] skip Unknown countries --- bin/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/server.py b/bin/server.py index 9cb59cc..ad17b9b 100644 --- a/bin/server.py +++ b/bin/server.py @@ -62,7 +62,10 @@ def pubLookup(value: str) -> bool: def countryLookup(country: str) -> dict: if country != 'None' or country is not None or country != 'Unknown': - return country_info[country] + if country in country_info: + return country_info[country] + else: + return {} else: return {}