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.py15
1 files changed, 7 insertions, 8 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 f2bcc43e..d90c35bb 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
@@ -49,6 +49,7 @@ config.addTargetAddr(
'my-creds'
)
+
# Error/response receiver
# noinspection PyUnusedLocal,PyUnusedLocal,PyUnusedLocal
def cbFun(snmpEngine, sendRequestHandle, errorIndication,
@@ -59,24 +60,22 @@ def cbFun(snmpEngine, sendRequestHandle, errorIndication,
# 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 '?'
- )
- )
+ 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 1 # signal dispatcher to continue
+
# Prepare initial request to be sent
cmdgen.NextCommandGenerator().sendVarBinds(
snmpEngine,
'my-router',
None, '', # contextEngineId, contextName
- [ ((1,3,6,1,2,1,1), None),
- ((1,3,6,1,4,1,1), None) ],
+ [((1, 3, 6, 1, 2, 1, 1), None),
+ ((1, 3, 6, 1, 4, 1, 1), None)],
cbFun
)