summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py')
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py b/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py
index 82e42879..499514f3 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py
@@ -46,6 +46,7 @@ config.addTransport(
udp.DOMAIN_NAME,
udp.UdpSocketTransport().openClientMode()
)
+
config.addTargetAddr(
snmpEngine, 'my-router',
udp.DOMAIN_NAME, ('104.236.166.95', 161),
@@ -60,13 +61,16 @@ def cbFun(snmpEngine, sendRequesthandle, errorIndication,
if errorIndication:
print(errorIndication)
return # stop on error
+
if errorStatus:
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 True # signal dispatcher to continue walking