summaryrefslogtreecommitdiff
path: root/examples/v1arch/asyncore/agent
diff options
context:
space:
mode:
authorelie <elie>2005-06-27 06:16:05 +0000
committerelie <elie>2005-06-27 06:16:05 +0000
commit21fba472b174771256eea405064c4712190beac3 (patch)
tree2ff18edaf153d2d7c013db94691ead75396b88f7 /examples/v1arch/asyncore/agent
parentb178b0bc2bf4f5605a5abcc127f87398dcbe5056 (diff)
downloadpysnmp-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.py6
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