1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

remove unused code

This commit is contained in:
chris meyers 2018-11-13 13:27:55 -05:00 committed by mabashian
parent 3f4d14e48d
commit a176a4b8cf

View File

@ -5,7 +5,6 @@ class SimpleDAG(object):
def __init__(self):
self.nodes = []
self.root_nodes = set([])
self.leaf_nodes = set([])
r'''
Track node_obj->node index
@ -104,7 +103,6 @@ class SimpleDAG(object):
'''
node_index = len(self.nodes)
self.root_nodes.add(node_index)
self.leaf_nodes.add(node_index)
self.node_obj_to_node_index[obj] = node_index
entry = dict(node_object=obj, metadata=metadata)
self.nodes.append(entry)
@ -133,13 +131,6 @@ class SimpleDAG(object):
self.node_from_edges_by_label[label][from_obj_ord].append(to_obj_ord)
self.node_to_edges_by_label[label][to_obj_ord].append(from_obj_ord)
'''
To node is no longer a leaf node
'''
for l in self.node_to_edges_by_label.keys():
if len(self.node_to_edges_by_label[l].get(to_obj_ord, [])) != 0:
self.leaf_nodes.discard(to_obj_ord)
def find_ord(self, obj):
return self.node_obj_to_node_index.get(obj, None)
@ -175,9 +166,6 @@ class SimpleDAG(object):
self.node_to_edges_by_label.keys())
return nodes
def get_leaf_nodes(self):
return [self.nodes[index] for index in self.leaf_nodes]
def get_root_nodes(self):
return [self.nodes[index] for index in self.root_nodes]