git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/refresh
diff options
context:
space:
mode:
Diffstat (limited to 'refresh')
-rwxr-xr-xrefresh4
1 files 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