git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Pfeiffer <harald.pfeiffer _ xmart.de> 2018-09-28 15:11:22 +0200
committerHarald Pfeiffer <harald.pfeiffer _ xmart.de> 2018-09-28 15:11:22 +0200
commit15b322c70a5661436ebbc8774d8e5fcffaae4c7a (patch)
tree8f20fe057b891c2315586c42475d6542e2acf1b1
parent89f283e04d2535173b8653acf59ba94a1bd165b4 (diff)
downloadtimewarrior-holidays-15b322c70a5661436ebbc8774d8e5fcffaae4c7a.tar.bz2
calling unicode() only once for args.* for conversion as we only use that
-rwxr-xr-xrefresh5
1 files changed, 3 insertions, 2 deletions
diff --git a/refresh b/refresh
index 7f372ef..b107112 100755
--- a/refresh
+++ b/refresh
@@ -119,16 +119,17 @@ def main(args):
year = [datetime.now().year]
for i in locode:
for j in year:
+ i = unicode(i); j = unicode(j)
sys.stdout.write("Fetching holiday data from holidata.net... (%s, %s)" % (i, j))
sys.stdout.flush()
- lines = hfetch(unicode(i), unicode(j))
+ lines = hfetch(i, j)
print(" done.")
if lines == "":
print("No lines returned from holidata.net for %s!", locode)
exit(3)
sys.stdout.write("Parsing data")
sys.stdout.flush()
- hparse(lines, unicode(i), unicode(j))
+ hparse(lines, i, j)
print(" done.")
if __name__ == "__main__":