diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-08-10 20:10:59 +0100 |
---|---|---|
committer | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-08-10 20:20:47 +0100 |
commit | f79b095ece9ff3bc50545ae90aac5de8e5b354e7 (patch) | |
tree | c741bd1a754f5bc70ee04ee9342d6d2b0dfec3ae | |
parent | 9ba77114c66451ce0017f37d20cb10c27bdcd084 (diff) | |
download | lorry-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.py | 2 |
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), |