summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py')
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py b/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
index c984a899..64e4e19f 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
@@ -43,6 +43,7 @@ config.addTransport(
udp.DOMAIN_NAME,
udp.UdpSocketTransport().openClientMode()
)
+
config.addTargetAddr(
snmpEngine, 'my-router',
udp.DOMAIN_NAME, ('104.236.166.95', 161),
@@ -57,16 +58,19 @@ def cbFun(snmpEngine, sendRequestHandle, errorIndication,
if errorIndication:
print(errorIndication)
return
+
# SNMPv1 response may contain noSuchName error *and* SNMPv2c exception,
# so we ignore noSuchName error here
if errorStatus and errorStatus != 2:
print('%s at %s' % (errorStatus.prettyPrint(),
errorIndex and varBindTable[-1][int(errorIndex) - 1][0] or '?'))
return # stop on error
+
for varBindRow in varBindTable:
for oid, val in varBindRow:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
- return 1 # signal dispatcher to continue
+
+ return True # signal dispatcher to continue
# Prepare initial request to be sent