summaryrefslogtreecommitdiff
path: root/pysnmp/entity
diff options
context:
space:
mode:
authorelie <elie>2015-12-19 13:45:04 +0000
committerelie <elie>2015-12-19 13:45:04 +0000
commit10a43697b989a7c960c81c1b6b9180e9f4143ff7 (patch)
tree07c18823bda682a6031336638465d8707b1b9c56 /pysnmp/entity
parentac82aea8e93c62522eee183ad20724d1a8e49dd3 (diff)
downloadpysnmp-git-10a43697b989a7c960c81c1b6b9180e9f4143ff7.tar.gz
fix to NotificationOriginator to cope with unspecified user callable
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))