summaryrefslogtreecommitdiff
path: root/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py')
-rw-r--r--examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py b/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
index 69e943d9..71cf6a70 100644
--- a/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
+++ b/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
@@ -17,13 +17,14 @@ Functionally similar to:
"""#
from pysnmp.hlapi.v1arch import *
-for (errorIndication,
- errorStatus,
- errorIndex,
- varBinds) in nextCmd(SnmpDispatcher(),
- CommunityData('public'),
- UdpTransportTarget(('demo.snmplabs.com', 161)),
- ObjectType(ObjectIdentity('IF-MIB'))):
+iterator = nextCmd(
+ SnmpDispatcher(),
+ CommunityData('public'),
+ UdpTransportTarget(('demo.snmplabs.com', 161)),
+ ObjectType(ObjectIdentity('IF-MIB'))
+)
+
+for errorIndication, errorStatus, errorIndex, varBinds in interator:
if errorIndication:
print(errorIndication)