From f79b095ece9ff3bc50545ae90aac5de8e5b354e7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 10 Aug 2020 20:10:59 +0100 Subject: showjob: Use local variable instead of re-evaluating the same expression JobShower.get_job_as_json assigns to a local 'path' variable, but doesn't use it. Use it instead of re-evaluating the same expression assigned to it. Caught by pyflakes. --- lorrycontroller/showjob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lorrycontroller/showjob.py b/lorrycontroller/showjob.py index bc82bfe..297b652 100644 --- a/lorrycontroller/showjob.py +++ b/lorrycontroller/showjob.py @@ -36,7 +36,7 @@ class JobShower(object): 'job_id': job_id, 'host': statedb.get_job_minion_host(job_id), 'pid': statedb.get_job_minion_pid(job_id), - 'path': statedb.get_job_path(job_id), + 'path': path, 'exit': 'no' if exit is None else exit, 'disk_usage': disk_usage, 'disk_usage_nice': self.format_bytesize(disk_usage or 0), -- cgit v1.2.1