From 0a476f2b33d43fa4a2068b2210afcb5ae2ad82ad Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 18 May 2020 20:42:20 +0200 Subject: [PATCH] misc: do not wait already deployed SP (#43035) --- hobo/agent/authentic2/management/commands/hobo_deploy.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hobo/agent/authentic2/management/commands/hobo_deploy.py b/hobo/agent/authentic2/management/commands/hobo_deploy.py index 12bc4d0..27d805e 100644 --- a/hobo/agent/authentic2/management/commands/hobo_deploy.py +++ b/hobo/agent/authentic2/management/commands/hobo_deploy.py @@ -123,7 +123,6 @@ class Command(hobo_deploy.Command): # create or update Service Providers services = hobo_environment['services'] retries = 0 - loaded = 0 provision_target_ous = {} max_retries = 1 if self.redeploy else 5 while retries < max_retries: @@ -132,7 +131,6 @@ class Command(hobo_deploy.Command): continue if not service.get('saml-sp-metadata-url'): service['$done'] = True - loaded += 1 continue sp_url = service['saml-sp-metadata-url'] metadata_text = None @@ -226,9 +224,8 @@ class Command(hobo_deploy.Command): self.load_skeleton(provider, service['service-id'], service['template_name']) service['$done'] = True - loaded += 1 - if len(services) == loaded: + if all(service.get('$done') for service in services): # it's finished no need to continue break