diff options
author | elie <elie> | 2015-12-19 13:45:04 +0000 |
---|---|---|
committer | elie <elie> | 2015-12-19 13:45:04 +0000 |
commit | 10a43697b989a7c960c81c1b6b9180e9f4143ff7 (patch) | |
tree | 07c18823bda682a6031336638465d8707b1b9c56 /pysnmp/entity/rfc3413 | |
parent | ac82aea8e93c62522eee183ad20724d1a8e49dd3 (diff) | |
download | pysnmp-git-10a43697b989a7c960c81c1b6b9180e9f4143ff7.tar.gz |
fix to NotificationOriginator to cope with unspecified user callable
Diffstat (limited to 'pysnmp/entity/rfc3413')
-rw-r--r-- | pysnmp/entity/rfc3413/ntforg.py | 7 |
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)) |