diff options
| author | Camille Mougey <commial@gmail.com> | 2018-09-28 09:30:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-28 09:30:23 +0200 |
| commit | 9c8596646ba6150694deb984f25aaad73d2c7125 (patch) | |
| tree | 35e52073cea394d3e66dfa89a53d81987869abe9 /miasm2/analysis/depgraph.py | |
| parent | a5ab3c338e09da5c3e2fe871f1f13e6e37464fa1 (diff) | |
| parent | 846d316efab8b8b654eee58b952cdf1ba2d3eb42 (diff) | |
| download | miasm-9c8596646ba6150694deb984f25aaad73d2c7125.tar.gz miasm-9c8596646ba6150694deb984f25aaad73d2c7125.zip | |
Merge pull request #852 from serpilliere/fix_lgtm_2
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 |