From cee91528a66a9d516dfdf734526846b86e0222f6 Mon Sep 17 00:00:00 2001
From: Dirk Sarpe <dirk.sarpe@idiv.de>
Date: Thu, 8 Aug 2019 13:25:46 +0200
Subject: [PATCH] change to python3

open the file in binary mode and encode utf8 gives the same result
as the python2 open and encode utf8
---
 event_display.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/event_display.py b/event_display.py
index e270fa1..caaa51e 100644
--- a/event_display.py
+++ b/event_display.py
@@ -60,7 +60,7 @@ def calendarlist2jinja(html_list, filename):
     j2_env = Environment(loader=FileSystemLoader(this_dir),
                          trim_blocks=True)
     output = j2_env.get_template('template.html').render(html_list=html_list)
-    out_file = open(this_dir + filename, "w")
+    out_file = open(this_dir + filename, "wb")
     out_file.write(output.encode("utf-8"))
     out_file.close()
 
-- 
GitLab