summaryrefslogtreecommitdiff
path: root/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py')
-rw-r--r--examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py b/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
index 22d52589..519c1bf2 100644
--- a/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
+++ b/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
@@ -19,16 +19,17 @@ Functionally similar to:
"""#
from pysnmp.hlapi.v1arch import *
-for (errorIndication,
- errorStatus,
- errorIndex,
- varBinds) in bulkCmd(SnmpDispatcher(),
- CommunityData('public'),
- UdpTransportTarget(('demo.snmplabs.com', 161)),
- 0, 50,
- ObjectType(ObjectIdentity('SNMPv2-MIB', 'system')),
- lookupMib=True,
- maxCalls=10):
+iterator = bulkCmd(
+ SnmpDispatcher(),
+ CommunityData('public'),
+ UdpTransportTarget(('demo.snmplabs.com', 161)),
+ 0, 50,
+ ObjectType(ObjectIdentity('SNMPv2-MIB', 'system')),
+ lookupMib=True,
+ maxCalls=10
+)
+
+for errorIndication, errorStatus, errorIndex, varBinds in iterator:
if errorIndication:
print(errorIndication)