automate: add newlines to captured exception

This commit is contained in:
Iain Learmonth 2022-05-27 15:23:46 +01:00
parent db6f4aef55
commit b0fe83b984

View file

@ -103,7 +103,7 @@ def run_job(job_cls: Type[BaseAutomation], *,
except Exception as e: # pylint: disable=broad-except
tb = TracebackException.from_exception(e)
success = False
logs = "".join(tb.format())
logs = "\n".join(tb.format())
if success:
automation.state = AutomationState.IDLE
automation.next_run = datetime.datetime.utcnow() + datetime.timedelta(