From bab25c2140147ace6ea6bd8666d26a273ae051e0 Mon Sep 17 00:00:00 2001 From: elie Date: Fri, 14 Oct 2005 14:32:30 +0000 Subject: * pretty print Agent response * query for Managed Objects provided by cmdrsp example --- examples/v1arch/asyncore/manager/cmdgen/fetch-scalar-value.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/v1arch/asyncore/manager') diff --git a/examples/v1arch/asyncore/manager/cmdgen/fetch-scalar-value.py b/examples/v1arch/asyncore/manager/cmdgen/fetch-scalar-value.py index 9f8f4eea..59073419 100644 --- a/examples/v1arch/asyncore/manager/cmdgen/fetch-scalar-value.py +++ b/examples/v1arch/asyncore/manager/cmdgen/fetch-scalar-value.py @@ -13,7 +13,7 @@ reqPDU = pMod.GetRequestPDU() pMod.apiPDU.setDefaults(reqPDU) pMod.apiPDU.setVarBinds( reqPDU, (((1,3,6,1,2,1,1,1,0), pMod.Null()), - ((1,3,6,1,2,1,1,2,0), pMod.Null())) + ((1,3,6,1,2,1,1,3,0), pMod.Null())) ) # Build message @@ -36,10 +36,10 @@ def cbRecvFun(transportDispatcher, transportDomain, transportAddress, # Check for SNMP errors reported errorStatus = pMod.apiPDU.getErrorStatus(rspPDU) if errorStatus: - print 'Error: ', errorStatus + print errorStatus.prettyOut(errorStatus) else: for oid, val in pMod.apiPDU.getVarBinds(rspPDU): - print oid, val + print oid, val.prettyOut(val) transportDispatcher.jobFinished(1) return wholeMsg -- cgit v1.2.1