summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 42a09a91..016a6234 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -25,6 +25,7 @@ import ctypes
import abc
import numbers
import json
+import inspect
from collections import OrderedDict
@@ -217,7 +218,11 @@ class AnalysisCompletionEvent(object):
if id(self) in _pending_analysis_completion_events:
del _pending_analysis_completion_events[id(self)]
try:
- self.callback(self)
+ callback_sig = inspect.signature(self.callback)
+ if len(callback_sig.parameters):
+ self.callback(self)
+ else:
+ self.callback()
except:
log.log_error(traceback.format_exc())