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