summaryrefslogtreecommitdiff
path: root/examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py')
-rw-r--r--examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py b/examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py
index 6a0fefda..41032e9b 100644
--- a/examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py
+++ b/examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py
@@ -26,8 +26,10 @@ from pysnmp.hlapi.v3arch.asyncio import *
@asyncio.coroutine
def run():
+
snmpEngine = SnmpEngine()
- errorIndication, errorStatus, errorIndex, varBinds = yield from sendNotification(
+
+ iterator = sendNotification(
snmpEngine,
CommunityData('public', mpModel=0),
UdpTransportTarget(('demo.snmplabs.com', 162)),
@@ -43,6 +45,8 @@ def run():
)
)
+ errorIndication, errorStatus, errorIndex, varBinds = yield from iterator
+
if errorIndication:
print(errorIndication)