From 18e869b34511fcbf63587f4dfc738448a79f527e Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Fri, 28 Sep 2018 13:26:00 +0200 Subject: Fixed wrong references --- refresh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refresh b/refresh index 5689f2a..dd94f80 100755 --- a/refresh +++ b/refresh @@ -58,13 +58,13 @@ def hfetch(locode, year): This function downloads the holiday data for a given ISO-3166 code from holidata.net It will return a single string containing all of the JSON. """ + lines = "" myurl = "https://holidata.net/" + locode + "/" + year + ".json" try: lines = urlopen(myurl).read().decode('utf-8') except HTTPError as httpe: if httpe.code == 404: - print("holidata.net does not have data for %s(%s), for %d." % (mylocale, myregion, - mydate)) + print("holidata.net does not have data for %s, for %s." % (locode, year)) else: print(httpe.code, httpe.read()) return lines -- cgit v1.2.3