mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 22:37:41 -02:30
Merge pull request #5921 from beeankha/fix_flake8_errors
Fix Misc. flake8 Errors Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -1,13 +1,11 @@
|
|||||||
# Copyright (c) 2015 Ansible, Inc.
|
# Copyright (c) 2015 Ansible, Inc.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
from multiprocessing import Process
|
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.cache import cache as django_cache
|
from django.core.cache import cache as django_cache
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
from django.db import connection as django_connection, connections
|
from django.db import connection as django_connection
|
||||||
from kombu import Exchange, Queue
|
from kombu import Exchange, Queue
|
||||||
|
|
||||||
from awx.main.utils.handlers import AWXProxyHandler
|
from awx.main.utils.handlers import AWXProxyHandler
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ class WorkflowDAG(SimpleDAG):
|
|||||||
elif p.job and p.job.status == "failed":
|
elif p.job and p.job.status == "failed":
|
||||||
status = "failure_nodes"
|
status = "failure_nodes"
|
||||||
#check that the nodes status matches either a pathway of the same status or is an always path.
|
#check that the nodes status matches either a pathway of the same status or is an always path.
|
||||||
if (p not in [node['node_object'] for node in self.get_parents(obj, status)]
|
if (p not in [node['node_object'] for node in self.get_parents(obj, status)] and
|
||||||
and p not in [node['node_object'] for node in self.get_parents(obj, "always_nodes")]):
|
p not in [node['node_object'] for node in self.get_parents(obj, "always_nodes")]):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ class TestDNR():
|
|||||||
assert 1 == len(do_not_run_nodes)
|
assert 1 == len(do_not_run_nodes)
|
||||||
assert nodes[3] == do_not_run_nodes[0]
|
assert nodes[3] == do_not_run_nodes[0]
|
||||||
|
|
||||||
|
|
||||||
class TestAllWorkflowNodes():
|
class TestAllWorkflowNodes():
|
||||||
# test workflow convergence is functioning as expected
|
# test workflow convergence is functioning as expected
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|||||||
Reference in New Issue
Block a user