From 79a43a123f874cb0b42c44b5478218f2e9946c77 Mon Sep 17 00:00:00 2001 From: "Jens Kleineheismann (heinzel)" Date: Mon, 27 Apr 2020 22:12:38 +0200 Subject: [PATCH] FIX: dav_submission: proper opening metadata.txt files After porting to our new host, an encoding error was thrown while reading metadata.txt. --- dav_submission/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dav_submission/views.py b/dav_submission/views.py index e6aeab9..a1159b0 100644 --- a/dav_submission/views.py +++ b/dav_submission/views.py @@ -48,7 +48,7 @@ class ListView(generic.ListView): 'group': None, 'timestamp': None, } - with open(metadata_file_path) as f: + with codecs.open(metadata_file_path, encoding='utf-8') as f: for line in f: mo = re.match(r'^Absender: (.*) <(.*)>$', line) if mo is not None: