diff options
| author | Camille Mougey <commial@gmail.com> | 2017-04-21 12:09:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-21 12:09:33 +0200 |
| commit | 31109b86989e2e0d3bc09a0283d7518979545011 (patch) | |
| tree | 1725db71c81115d30ee5ac47208104c4f13def1a /miasm2/core/graph.py | |
| parent | 4f2f7bd6c808a87e2713c27ab2a3f1cebd778d99 (diff) | |
| parent | 102ad42976e7fcae3c67a21b61d0fe9294eb1fc4 (diff) | |
| download | miasm-31109b86989e2e0d3bc09a0283d7518979545011.tar.gz miasm-31109b86989e2e0d3bc09a0283d7518979545011.zip | |
Merge pull request #521 from serpilliere/ir_helper
Ir helper
Diffstat (limited to 'miasm2/core/graph.py')
| -rw-r--r-- | miasm2/core/graph.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/miasm2/core/graph.py b/miasm2/core/graph.py index d97ca8be..ec9eac36 100644 --- a/miasm2/core/graph.py +++ b/miasm2/core/graph.py @@ -100,6 +100,11 @@ class DiGraph(object): self._nodes_succ[src].remove(dst) self._nodes_pred[dst].remove(src) + def discard_edge(self, src, dst): + """Remove edge between @src and @dst if it exits""" + if (src, dst) in self._edges: + self.del_edge(src, dst) + def predecessors_iter(self, node): if not node in self._nodes_pred: raise StopIteration |