diff options
author | elie <elie> | 2012-09-04 15:18:11 +0000 |
---|---|---|
committer | elie <elie> | 2012-09-04 15:18:11 +0000 |
commit | 5e672aafb344db5ebbf52422ed23705e458ad24e (patch) | |
tree | 67a46b10c4ebed515a21e835b6bbb325cd765fcb | |
parent | 7bf68cdf77a8364dd31caee806d7f5f25d3dda5c (diff) | |
download | pysnmp-5e672aafb344db5ebbf52422ed23705e458ad24e.tar.gz |
cosmetics
-rw-r--r-- | examples/v3arch/oneliner/agent/ntforg.py | 6 | ||||
-rw-r--r-- | examples/v3arch/oneliner/manager/async/nextgen.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/v3arch/oneliner/agent/ntforg.py b/examples/v3arch/oneliner/agent/ntforg.py index a9ac2a7..0bdfedc 100644 --- a/examples/v3arch/oneliner/agent/ntforg.py +++ b/examples/v3arch/oneliner/agent/ntforg.py @@ -28,9 +28,9 @@ if errorIndication: # over IPv4/UDP # send TRAP notification # with Generic Trap #6 (enterpriseSpecific) and Specific Trap 432 -# with Uptime value 12345 -# with Agent Address '127.0.0.1' -# with Enterprise OID 1.3.6.1.4.1.20408.4.1.1.2 +# overriding Uptime value with 12345 +# overriding Agent Address with '127.0.0.1' +# overriding Enterprise OID with 1.3.6.1.4.1.20408.4.1.1.2 # include managed object information '1.3.6.1.2.1.1.1.0' = 'my system' errorIndication = ntfOrg.sendNotification( ntforg.CommunityData('public', mpModel=0), diff --git a/examples/v3arch/oneliner/manager/async/nextgen.py b/examples/v3arch/oneliner/manager/async/nextgen.py index 8e89744..bab7ceb 100644 --- a/examples/v3arch/oneliner/manager/async/nextgen.py +++ b/examples/v3arch/oneliner/manager/async/nextgen.py @@ -30,14 +30,14 @@ def cbFun(sendRequestHandle, errorIndication, errorStatus, errorIndex, print('%s via %s' % (authData, transportTarget)) if errorIndication: print(errorIndication) - return 1 + return if errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' ) ) - return 1 + return varBindTableRow = varBindTable[-1] for idx in range(len(varBindTableRow)): name, val = varBindTableRow[idx] @@ -55,7 +55,7 @@ def cbFun(sendRequestHandle, errorIndication, errorStatus, errorIndex, else: print('%s = %s' % (oid.prettyPrint(), val.prettyPrint())) - return 1 # continue table retrieval + return True # continue table retrieval cmdGen = cmdgen.AsynCommandGenerator() |