diff options
author | elie <elie> | 2005-10-14 14:32:30 +0000 |
---|---|---|
committer | elie <elie> | 2005-10-14 14:32:30 +0000 |
commit | 66ee3bbf2c56fd8e8ca3a31d8853d7dc91d27daf (patch) | |
tree | afc3debce3f74930e751daba2ddad03ddc8c925b | |
parent | ec761a2813b60d27e11b1437bb4310a87d6f9211 (diff) | |
download | pysnmp-66ee3bbf2c56fd8e8ca3a31d8853d7dc91d27daf.tar.gz |
* pretty print Agent response
* query for Managed Objects provided by cmdrsp example
-rw-r--r-- | examples/v1arch/manager/getgen.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/v1arch/manager/getgen.py b/examples/v1arch/manager/getgen.py index 9f8f4ee..5907341 100644 --- a/examples/v1arch/manager/getgen.py +++ b/examples/v1arch/manager/getgen.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 |