summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-08-10 19:58:05 +0100
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-08-10 20:20:28 +0100
commit83dbd06e1fee579d9873b8f6ca8292dccb91e51d (patch)
tree56c4c264765d4763fe79fc31f6aa5a41bb193ada
parentccb96f728b11bf3f7c14b9752286e679d850d92f (diff)
downloadlorry-controller-83dbd06e1fee579d9873b8f6ca8292dccb91e51d.tar.gz
givemejob: Fix upstream host metadata lookup
Commit bc7f80d "givemejob: Move upstream host metadata lookup out of get_repo_metadata" failed to pass through the statedb variable into the new function, so it will never work. Caught by pyflakes.
-rw-r--r--lorrycontroller/givemejob.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lorrycontroller/givemejob.py b/lorrycontroller/givemejob.py
index ee998ea..2f7580f 100644
--- a/lorrycontroller/givemejob.py
+++ b/lorrycontroller/givemejob.py
@@ -69,7 +69,7 @@ class GiveMeJob(lorrycontroller.LorryControllerRoute):
return (lorry_info['running_job'] is None and due <= now)
@staticmethod
- def get_upstream_host_repo_metadata(lorry_info):
+ def get_upstream_host_repo_metadata(statedb, lorry_info):
assert lorry_info['from_host']
assert lorry_info['from_path']
@@ -172,7 +172,7 @@ class GiveMeJob(lorrycontroller.LorryControllerRoute):
host_name = lorry_info['from_host']
if host_name:
- metadata = self.get_upstream_host_repo_metadata(lorry_info)
+ metadata = self.get_upstream_host_repo_metadata(statedb, lorry_info)
else:
host_name, metadata = self.get_single_repo_metadata(lorry_info)