summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelie <elie>2009-07-31 20:00:51 +0000
committerelie <elie>2009-07-31 20:00:51 +0000
commitc8d5c00532a9d2fe7133b8b1bcbd05c16d8e04e7 (patch)
tree96b0a8026a6c3a27c2bed5fcf8d49885b7b45f6a
parent1489b00db8fddd574a7f50d418eae8f317ef851a (diff)
downloadpysnmp-c8d5c00532a9d2fe7133b8b1bcbd05c16d8e04e7.tar.gz
cbFun takes sendRequestHandle
-rw-r--r--examples/v3arch/agent/ntforg.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/v3arch/agent/ntforg.py b/examples/v3arch/agent/ntforg.py
index e9265d9..5765e9f 100644
--- a/examples/v3arch/agent/ntforg.py
+++ b/examples/v3arch/agent/ntforg.py
@@ -51,11 +51,11 @@ config.addVacmUser(snmpEngine, 3, 'test-user', 'authPriv',
# SNMP context
snmpContext = context.SnmpContext(snmpEngine)
-def cbFun(snmpEngine, errorIndication, cbCtx):
+def cbFun(sendRequestHandle, errorIndication, cbCtx):
if errorIndication:
print errorIndication
-errorIndication = ntforg.NotificationOriginator(snmpContext).sendNotification(
+ntforg.NotificationOriginator(snmpContext).sendNotification(
snmpEngine,
# Notification targets
'myNotifyName',
@@ -66,7 +66,4 @@ errorIndication = ntforg.NotificationOriginator(snmpContext).sendNotification(
cbFun
)
-if errorIndication:
- print errorIndication
-else:
- snmpEngine.transportDispatcher.runDispatcher()
+snmpEngine.transportDispatcher.runDispatcher()