From 83dbd06e1fee579d9873b8f6ca8292dccb91e51d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 10 Aug 2020 19:58:05 +0100 Subject: 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. --- lorrycontroller/givemejob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lorrycontroller') 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) -- cgit v1.2.1