summaryrefslogtreecommitdiff
path: root/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-async-queries.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-async-queries.py')
-rw-r--r--examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-async-queries.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-async-queries.py b/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-async-queries.py
index 0c6e9bf..6222c3e 100644
--- a/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-async-queries.py
+++ b/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-async-queries.py
@@ -72,14 +72,9 @@ def cbFun(snmpEngine, sendRequestHandle, errorIndication,
snmpEngine = SnmpEngine()
-cmdGen = AsyncCommandGenerator()
-
# Submit GET requests
for authData, transportTarget, varNames in targets:
- cmdGen.getCmd(
- snmpEngine, authData, transportTarget, ContextData(), varNames,
- # User-space callback function and its context
- (cbFun, (authData, transportTarget))
- )
+ getCmd(snmpEngine, authData, transportTarget, ContextData(), varNames,
+ cbFun=cbFun, cbCtx=(authData, transportTarget))
snmpEngine.transportDispatcher.runDispatcher()