From b9f1f5a8b5cccc034ce7ec041ccd53c9b9a43c7e Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Tue, 5 Feb 2019 17:46:51 +0100 Subject: [PATCH] Fix for pycountry 18.12.8 https://bitbucket.org/flyingcircus/pycountry/commits/72b1927b3cb9bfd81b547244eefc45395e23f9b8#chg-HISTORY.txt --- scripts/build_powerplants.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index 975169fe..4e76a408 100644 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -13,6 +13,8 @@ def country_alpha_2(name): try: cntry = pyc.countries.get(name=name) except KeyError: + cntry = None + if cntry is None: cntry = pyc.countries.get(official_name=name) return cntry.alpha_2