diff options
| author | Brian Potchik <brian@vector35.com> | 2023-08-16 21:20:22 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2023-08-16 21:20:22 -0400 |
| commit | 6bec4ea57f4465edcaf4e7e16e02284f2f6c5f92 (patch) | |
| tree | c068953487019150d8b6d32f578a533b04e0cff1 /python/binaryview.py | |
| parent | 5823930694686322430747031324833666177725 (diff) | |
Handle case where __init__ on BinaryDataNotifications base class is not called by the derived class. (skip-ci)
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 2 |
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) |
