From dffb1f711db1ea1b518c663dbbae7584efdd1906 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 2 Apr 2019 00:05:52 +0200 Subject: [PATCH] [fix] f-string doesn't work like that in multilines --- run.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/run.py b/run.py index bb60c46..3d3254e 100644 --- a/run.py +++ b/run.py @@ -778,7 +778,7 @@ async def api_stop_job(request, job_id): if job.state == "scheduled": api_logger.info(f"Cancel scheduled job '{job.name}' [job.id] " - "on request") + f"on request") job.state = "canceled" job.save() @@ -810,13 +810,13 @@ async def api_stop_job(request, job_id): if job.state in ("done", "canceled", "failure", "error"): api_logger.info(f"Request to cancel job '{job.name}' " - "[job.id] but job is already in '{job.state}' state, " - "do nothing") + f"[job.id] but job is already in '{job.state}' state, " + f"do nothing") # nothing to do, task is already done return response.text("ok") raise Exception(f"Tryed to cancel a job with an unknown state: " - "{job.state}") + f"{job.state}") @app.route("/api/job//restart", methods=['POST'])