summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-08-10 20:10:59 +0100
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-08-10 20:20:47 +0100
commitf79b095ece9ff3bc50545ae90aac5de8e5b354e7 (patch)
treec741bd1a754f5bc70ee04ee9342d6d2b0dfec3ae
parent9ba77114c66451ce0017f37d20cb10c27bdcd084 (diff)
downloadlorry-controller-f79b095ece9ff3bc50545ae90aac5de8e5b354e7.tar.gz
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.
-rw-r--r--lorrycontroller/showjob.py2
1 files changed, 1 insertions, 1 deletions
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),