diff options
author | elie <elie> | 2010-11-14 23:17:39 +0000 |
---|---|---|
committer | elie <elie> | 2010-11-14 23:17:39 +0000 |
commit | 0f77f8e91bab9c0e2c760c01e20d75878b79b481 (patch) | |
tree | 548a02dd61ec013007657052167c1e80dcd33d04 /examples/v1arch | |
parent | 4723092cd66ab6bb352db17b7ae5c0182df54884 (diff) | |
download | pysnmp-0f77f8e91bab9c0e2c760c01e20d75878b79b481.tar.gz |
* getVarBindTable() does not filter SNMP exception values anymore
* getVarBindTable() of v1 API now returns Null instead of None
* GETNEXT/GETBULK apps now track EOM condition automatically
Diffstat (limited to 'examples/v1arch')
-rw-r--r-- | examples/v1arch/manager/nextgen.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/v1arch/manager/nextgen.py b/examples/v1arch/manager/nextgen.py index 08c4575..14dcebd 100644 --- a/examples/v1arch/manager/nextgen.py +++ b/examples/v1arch/manager/nextgen.py @@ -7,6 +7,7 @@ from time import time # Protocol version to use pMod = api.protoModules[api.protoVersion1] +#pMod = api.protoModules[api.protoVersion2c] # SNMP table header headVars = [ pMod.ObjectIdentifier((1,3,6)) ] @@ -46,14 +47,12 @@ def cbRecvFun(transportDispatcher, transportDomain, transportAddress, # Report SNMP table for tableRow in varBindTable: for name, val in tableRow: - if val is None: - continue print 'from: %s, %s = %s' % ( transportAddress, name.prettyPrint(), val.prettyPrint() ) # Stop on EOM for oid, val in varBindTable[-1]: - if val is not None: + if not isinstance(val, pMod.Null): break else: transportDispatcher.jobFinished(1) |