git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Pfeiffer <harald.pfeiffer _ xmart.de> 2018-09-25 16:35:37 +0200
committerHarald Pfeiffer <harald.pfeiffer _ xmart.de> 2018-09-25 16:35:37 +0200
commit8565abab0b451bd26753caf378835ac2698f37dc (patch)
tree4ed3c3f76c9e368f6a26760d0d1e297bd3fd217e
parentf62a90b2160b5b2900da8b11fe410abce0889318 (diff)
downloadtimewarrior-holidays-8565abab0b451bd26753caf378835ac2698f37dc.tar.bz2
we don't need country in caps at all
-rwxr-xr-xrefresh5
1 files 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')