summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2023-08-16 21:20:22 -0400
committerBrian Potchik <brian@vector35.com>2023-08-16 21:20:22 -0400
commit6bec4ea57f4465edcaf4e7e16e02284f2f6c5f92 (patch)
treec068953487019150d8b6d32f578a533b04e0cff1 /python
parent5823930694686322430747031324833666177725 (diff)
Handle case where __init__ on BinaryDataNotifications base class is not called by the derived class. (skip-ci)
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 5573b81f..edf992e0 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -530,7 +530,7 @@ class BinaryDataNotificationCallbacks:
self._notify = notify
self._cb = core.BNBinaryDataNotification()
self._cb.context = 0
- if notify.notifications is None:
+ if (not hasattr(notify, 'notifications')) or (hasattr(notify, 'notifications') and notify.notifications is None):
self._cb.notificationBarrier = self._cb.notificationBarrier
self._cb.dataWritten = self._cb.dataWritten.__class__(self._data_written)
self._cb.dataInserted = self._cb.dataInserted.__class__(self._data_inserted)