diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-09-11 08:33:18 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-09-20 07:44:31 +0200 |
| commit | 846d316efab8b8b654eee58b952cdf1ba2d3eb42 (patch) | |
| tree | 217e8f5b825ad11c224d016a6d54b9224337b5f6 /miasm2/analysis/depgraph.py | |
| parent | 2f9139cbc737978d7308496bb8249a99431320e7 (diff) | |
| download | miasm-846d316efab8b8b654eee58b952cdf1ba2d3eb42.tar.gz miasm-846d316efab8b8b654eee58b952cdf1ba2d3eb42.zip | |
Code cleaning: lgtm.com
Diffstat (limited to '')
| -rw-r--r-- | miasm2/analysis/depgraph.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/miasm2/analysis/depgraph.py b/miasm2/analysis/depgraph.py index 46a83d2d..0d4a3719 100644 --- a/miasm2/analysis/depgraph.py +++ b/miasm2/analysis/depgraph.py @@ -50,6 +50,9 @@ class DependencyNode(object): self.element == depnode.element and self.line_nb == depnode.line_nb) + def __ne__(self, other): + return not self.__eq__(other) + def __cmp__(self, node): """Compares @self with @node.""" if not isinstance(node, self.__class__): @@ -195,8 +198,9 @@ class DependencyResult(DependencyState): """Container and methods for DependencyGraph results""" def __init__(self, ircfg, initial_state, state, inputs): + + super(DependencyResult, self).__init__(state.loc_key, state.pending) self.initial_state = initial_state - self.loc_key = state.loc_key self.history = state.history self.pending = state.pending self.line_nb = state.line_nb @@ -205,7 +209,6 @@ class DependencyResult(DependencyState): self._ircfg = ircfg # Init lazy elements - self._graph = None self._has_loop = None @property |