diff options
Diffstat (limited to 'refresh')
-rwxr-xr-x | refresh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |