To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 197d7b4c authored by Reto Da Forno's avatar Reto Da Forno
Browse files

check for decode error in read serial file

parent 9095291b
......@@ -358,7 +358,14 @@ def worker_serial(queueitem=None, nodeid=None, resultfile_path=None, logqueue=No
with open(resultfile_path, "a") as outfile:
infile = open(inputfilename, "r")
for line in infile:
# read line by line and check for decode errors
while True:
try:
line = infile.readline()
except UnicodeDecodeError:
continue
if not line:
break
try:
(timestamp, msg) = line.strip().split(',', 1)
except:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment