From 8565abab0b451bd26753caf378835ac2698f37dc Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Tue, 25 Sep 2018 16:35:37 +0200 Subject: we don't need country in caps at all --- refresh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/refresh b/refresh index 44fac16..188f65b 100755 --- a/refresh +++ b/refresh @@ -82,15 +82,14 @@ def hparse(lines, locode, year): sys.stdout.write(".") jdata = json.loads(line) mylocale = unicode(jdata['locale']) - mycountry = mylocale.split('-')[1] - myscountry = mycountry.lower() + mycountry = mylocale.split('-')[1].lower() myregion = unicode(jdata['region']) if myregion == "": myregion = mylocale.split('-')[1] # holidata.net violates ISO-3166-2:DE here: if myregion == "NRW": myregion = "NW" # or Neustadt/Weinstr., Palz > Pott - myhlocale = unicode(myscountry + "-" + myregion) + myhlocale = unicode(mycountry + "-" + myregion) if jdata['date'] == "": print("%s has no date given for %s!", jdata['description'], jdata['locale']) mydate = unicode('1970_01_01') -- cgit v1.2.3