diff options
| author | Josh Ferrell <josh@vector35.com> | 2020-05-05 20:43:52 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2020-05-05 20:43:52 -0400 |
| commit | 1f84c9eb3bb640788f2cdad58ca5eab526861502 (patch) | |
| tree | 98283fce00d2392ce6c1101f87cd9811760fb4f2 /python | |
| parent | 3b95df3cb712610d67df5e87a6e1d286aabc2365 (diff) | |
Fix analysis completion events for python 2
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 016a6234..79289def 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -218,8 +218,9 @@ class AnalysisCompletionEvent(object): if id(self) in _pending_analysis_completion_events: del _pending_analysis_completion_events[id(self)] try: - callback_sig = inspect.signature(self.callback) - if len(callback_sig.parameters): + arg_offset = inspect.ismethod(self.callback) + callback_spec = inspect.getargspec(self.callback) + if len(callback_spec.args) > arg_offset: self.callback(self) else: self.callback() |
