diff options
author | elie <elie> | 2005-06-27 06:16:05 +0000 |
---|---|---|
committer | elie <elie> | 2005-06-27 06:16:05 +0000 |
commit | 21fba472b174771256eea405064c4712190beac3 (patch) | |
tree | 2ff18edaf153d2d7c013db94691ead75396b88f7 /examples/v1arch/asyncore/agent | |
parent | b178b0bc2bf4f5605a5abcc127f87398dcbe5056 (diff) | |
download | pysnmp-git-21fba472b174771256eea405064c4712190beac3.tar.gz |
pass naked OIDs to simplify examples; examples with MIB resolution moved
to withmib/*
Diffstat (limited to 'examples/v1arch/asyncore/agent')
-rw-r--r-- | examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py b/examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py index ee8488e2..15d06b8e 100644 --- a/examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py +++ b/examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py @@ -32,7 +32,7 @@ for mibVar in mibInstr: def cbFun(transportDispatcher, transportDomain, transportAddress, wholeMsg): while wholeMsg: - msgVer = int(api.decodeMessageVersion(wholeMsg)) + msgVer = api.decodeMessageVersion(wholeMsg) pMod = api.protoModules[msgVer] reqMsg, wholeMsg = decoder.decode( wholeMsg, asn1Spec=pMod.Message(), @@ -59,9 +59,9 @@ def cbFun(transportDispatcher, transportDomain, transportAddress, wholeMsg): ) elif reqPDU.isSameTypeWith(pMod.GetRequestPDU()): for oid, val in pMod.apiPDU.getVarBinds(reqPDU): - if mibInstrIdx.has_key(tuple(oid)): + if mibInstrIdx.has_key(oid): varBinds.append( - (oid, mibInstrIdx[tuple(oid)](msgVer)) + (oid, mibInstrIdx[oid](msgVer)) ) else: # No such instance |