diff options
| author | H. P. <harald.p.@xmart.de> | 2018-09-28 15:11:22 +0200 | 
|---|---|---|
| committer | H. P. <harald.p.@xmart.de> | 2018-09-28 15:11:22 +0200 | 
| commit | 15b322c70a5661436ebbc8774d8e5fcffaae4c7a (patch) | |
| tree | 8f20fe057b891c2315586c42475d6542e2acf1b1 | |
| parent | 89f283e04d2535173b8653acf59ba94a1bd165b4 (diff) | |
| download | timewarrior-holidays-15b322c70a5661436ebbc8774d8e5fcffaae4c7a.tar.bz2 | |
calling unicode() only once for args.* for conversion as we only use that
| -rwxr-xr-x | refresh | 5 | 
1 files changed, 3 insertions, 2 deletions
| @@ -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__": | 
