From 6bec4ea57f4465edcaf4e7e16e02284f2f6c5f92 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Wed, 16 Aug 2023 21:20:22 -0400 Subject: Handle case where __init__ on BinaryDataNotifications base class is not called by the derived class. (skip-ci) --- python/binaryview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/binaryview.py') 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) -- cgit v1.3.1