summaryrefslogtreecommitdiff
path: root/pysnmp/entity
diff options
context:
space:
mode:
Diffstat (limited to 'pysnmp/entity')
-rw-r--r--pysnmp/entity/rfc3413/ntforg.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pysnmp/entity/rfc3413/ntforg.py b/pysnmp/entity/rfc3413/ntforg.py
index 5af3fe90..712c694c 100644
--- a/pysnmp/entity/rfc3413/ntforg.py
+++ b/pysnmp/entity/rfc3413/ntforg.py
@@ -270,9 +270,10 @@ class NotificationOriginator:
not self.__pendingNotifications[notificationHandle]:
if notificationHandle in self.__pendingNotifications:
del self.__pendingNotifications[notificationHandle]
- cbFun(snmpEngine, notificationHandle,
- statusInformation['errorIndication'], 0, 0, (),
- cbCtx)
+ if cbFun:
+ cbFun(snmpEngine, notificationHandle,
+ statusInformation['errorIndication'], 0, 0, (),
+ cbCtx)
return notificationHandle
debug.logger & debug.flagApp and debug.logger('sendVarBinds: notificationHandle %s, sendRequestHandle %s, timeout %d' % (notificationHandle, sendRequestHandle, timeout))