Commit 3e74f667 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

avoid exceptions when updating jobs if "message" is not a string

WIP on #205
parent c154feac
......@@ -1721,13 +1721,13 @@ class Job(models.Model):
if output == "std_out":
print(message, file=sys.stdout)
split_std_out = self.std_out.split("\n")
split_std_out = split_std_out + message.split("\n")
split_std_out = split_std_out + str(message).split("\n")
self.std_out = "\n".join(split_std_out[-100:])
self.save()
elif output == "std_err":
print(message, file=sys.stderr)
split_std_err = self.std_err.split("\n")
split_std_err = split_std_err + message.split("\n")
split_std_err = split_std_err + str(message).split("\n")
self.std_err = "\n".join(split_std_err[-100:])
self.save()
else:
......
Supports Markdown
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