summaryrefslogtreecommitdiff
path: root/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py')
-rw-r--r--examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py b/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py
index 49257a1c..1bdcf87a 100644
--- a/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py
+++ b/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py
@@ -19,17 +19,18 @@ Functionally similar to:
"""#
from pysnmp.hlapi.v1arch import *
-for (errorIndication,
- errorStatus,
- errorIndex,
- varBinds) in bulkCmd(SnmpDispatcher(),
- CommunityData('public'),
- UdpTransportTarget(('demo.snmplabs.com', 161)),
- 1, 25,
- ObjectType(ObjectIdentity('IP-MIB', 'ipAdEntAddr')),
- ObjectType(ObjectIdentity('IP-MIB', 'ipAddrEntry')),
- lookupMib=True,
- lexicographicMode=False):
+iterator = bulkCmd(
+ SnmpDispatcher(),
+ CommunityData('public'),
+ UdpTransportTarget(('demo.snmplabs.com', 161)),
+ 1, 25,
+ ObjectType(ObjectIdentity('IP-MIB', 'ipAdEntAddr')),
+ ObjectType(ObjectIdentity('IP-MIB', 'ipAddrEntry')),
+ lookupMib=True,
+ lexicographicMode=False
+)
+
+for errorIndication, errorStatus, errorIndex, varBinds in iterator:
if errorIndication:
print(errorIndication)