ipapython/graph.py redundant variable fix

Changed deletion of edges in remove_vertex method because there's no
need to store redundant variable in memory.

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Aleksei Slaikovskii 2017-07-07 15:51:01 +02:00 committed by Tomas Krizek
parent fe913b9c9f
commit c39da523ad
No known key found for this signature in database
GPG Key ID: 22A2A94B5E49415A

View File

@ -54,8 +54,9 @@ class Graph(object):
adj[:] = [v for v in adj if v != vertex]
# delete edges
edges = [e for e in self.edges if e[0] != vertex and e[1] != vertex]
self.edges[:] = edges
self.edges = [
e for e in self.edges if e[0] != vertex and e[1] != vertex
]
def get_tails(self, head):
"""