summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncore/manager/cmdgen/spoof-source-address.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/asyncore/manager/cmdgen/spoof-source-address.py')
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/spoof-source-address.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/v3arch/asyncore/manager/cmdgen/spoof-source-address.py b/examples/v3arch/asyncore/manager/cmdgen/spoof-source-address.py
index 10050e3f..da7878f2 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/spoof-source-address.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/spoof-source-address.py
@@ -77,11 +77,13 @@ def cbFun(snmpEngine, sendRequestHandle, errorIndication,
errorStatus, errorIndex, varBinds, cbCtx):
if errorIndication:
print(errorIndication)
+
# SNMPv1 response may contain noSuchName error *and* SNMPv2c exception,
# so we ignore noSuchName error here
elif errorStatus and errorStatus != 2:
print('%s at %s' % (errorStatus.prettyPrint(),
errorIndex and varBinds[int(errorIndex) - 1][0] or '?'))
+
else:
for oid, val in varBinds:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))