diff options
author | elie <elie> | 2013-03-15 20:44:59 +0000 |
---|---|---|
committer | elie <elie> | 2013-03-15 20:44:59 +0000 |
commit | 11abdaef66b3b2be7e21de51ab5ac44a43f18112 (patch) | |
tree | e0d82dfbd0f14704aa23d01dd764a3390174373d /examples/v3arch/manager/cmdgen | |
parent | 989a6dbe7394ff8276bc8a8e7c9d8dacddadc495 (diff) | |
download | pysnmp-11abdaef66b3b2be7e21de51ab5ac44a43f18112.tar.gz |
cosmetic fix to printout the exact OID as pointed out by errorIndex
Diffstat (limited to 'examples/v3arch/manager/cmdgen')
13 files changed, 13 insertions, 13 deletions
diff --git a/examples/v3arch/manager/cmdgen/get-v1.py b/examples/v3arch/manager/cmdgen/get-v1.py index 558a4e9..2713cf4 100644 --- a/examples/v3arch/manager/cmdgen/get-v1.py +++ b/examples/v3arch/manager/cmdgen/get-v1.py @@ -56,7 +56,7 @@ def cbFun(sendRequestHandle, elif errorStatus and errorStatus != 2: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBinds[-1][int(errorIndex)-1] or '?' + errorIndex and varBinds[int(errorIndex)-1][0] or '?' ) ) else: diff --git a/examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py b/examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py index d903799..5c9e19c 100644 --- a/examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py +++ b/examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py @@ -59,7 +59,7 @@ def cbFun(sendRequestHandle, elif errorStatus and errorStatus != 2: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBinds[-1][int(errorIndex)-1] or '?' + errorIndex and varBinds[int(errorIndex)-1][0] or '?' ) ) else: diff --git a/examples/v3arch/manager/cmdgen/get-v3-custom-context.py b/examples/v3arch/manager/cmdgen/get-v3-custom-context.py index 6612384..1309c76 100644 --- a/examples/v3arch/manager/cmdgen/get-v3-custom-context.py +++ b/examples/v3arch/manager/cmdgen/get-v3-custom-context.py @@ -58,7 +58,7 @@ def cbFun(sendRequestHandle, elif errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBinds[-1][int(errorIndex)-1] or '?' + errorIndex and varBinds[int(errorIndex)-1][0] or '?' ) ) else: diff --git a/examples/v3arch/manager/cmdgen/get-v3.py b/examples/v3arch/manager/cmdgen/get-v3.py index 45a1430..dde6a76 100644 --- a/examples/v3arch/manager/cmdgen/get-v3.py +++ b/examples/v3arch/manager/cmdgen/get-v3.py @@ -56,7 +56,7 @@ def cbFun(sendRequestHandle, elif errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBinds[-1][int(errorIndex)-1] or '?' + errorIndex and varBinds[int(errorIndex)-1][0] or '?' ) ) else: diff --git a/examples/v3arch/manager/cmdgen/getbulk-v2c.py b/examples/v3arch/manager/cmdgen/getbulk-v2c.py index af66b9a..58a0232 100644 --- a/examples/v3arch/manager/cmdgen/getbulk-v2c.py +++ b/examples/v3arch/manager/cmdgen/getbulk-v2c.py @@ -56,7 +56,7 @@ def cbFun(sendRequesthandle, errorIndication, errorStatus, errorIndex, if errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' + errorIndex and varBindTable[-1][int(errorIndex)-1][0] or '?' ) ) return # stop on error diff --git a/examples/v3arch/manager/cmdgen/getbulk-v3.py b/examples/v3arch/manager/cmdgen/getbulk-v3.py index f478bc6..a9be86e 100644 --- a/examples/v3arch/manager/cmdgen/getbulk-v3.py +++ b/examples/v3arch/manager/cmdgen/getbulk-v3.py @@ -58,7 +58,7 @@ def cbFun(sendRequesthandle, errorIndication, errorStatus, errorIndex, if errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' + errorIndex and varBindTable[-1][int(errorIndex)-1][0] or '?' ) ) return # stop on error diff --git a/examples/v3arch/manager/cmdgen/getnext-v1.py b/examples/v3arch/manager/cmdgen/getnext-v1.py index bc96083..b2cf9ad 100644 --- a/examples/v3arch/manager/cmdgen/getnext-v1.py +++ b/examples/v3arch/manager/cmdgen/getnext-v1.py @@ -58,7 +58,7 @@ def cbFun(sendRequestHandle, if errorStatus and errorStatus != 2: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' + errorIndex and varBindTable[-1][int(errorIndex)-1][0] or '?' ) ) return # stop on error diff --git a/examples/v3arch/manager/cmdgen/getnext-v2c-from-specific-address.py b/examples/v3arch/manager/cmdgen/getnext-v2c-from-specific-address.py index c8d2b09..53fd983 100644 --- a/examples/v3arch/manager/cmdgen/getnext-v2c-from-specific-address.py +++ b/examples/v3arch/manager/cmdgen/getnext-v2c-from-specific-address.py @@ -59,7 +59,7 @@ def cbFun(sendRequestHandle, if errorStatus and errorStatus != 2: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' + errorIndex and varBindTable[-1][int(errorIndex)-1][0] or '?' ) ) return # stop on error diff --git a/examples/v3arch/manager/cmdgen/getnext-v3-over-ipv6.py b/examples/v3arch/manager/cmdgen/getnext-v3-over-ipv6.py index 8d235cb..88fa584 100644 --- a/examples/v3arch/manager/cmdgen/getnext-v3-over-ipv6.py +++ b/examples/v3arch/manager/cmdgen/getnext-v3-over-ipv6.py @@ -57,7 +57,7 @@ def cbFun(sendRequestHandle, if errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' + errorIndex and varBindTable[-1][int(errorIndex)-1][0] or '?' ) ) return # stop on error diff --git a/examples/v3arch/manager/cmdgen/getnext-v3-pull-subtree.py b/examples/v3arch/manager/cmdgen/getnext-v3-pull-subtree.py index c3142f9..241595a 100644 --- a/examples/v3arch/manager/cmdgen/getnext-v3-pull-subtree.py +++ b/examples/v3arch/manager/cmdgen/getnext-v3-pull-subtree.py @@ -60,7 +60,7 @@ def cbFun(sendRequestHandle, if errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' + errorIndex and varBindTable[-1][int(errorIndex)-1][0] or '?' ) ) return # stop on error diff --git a/examples/v3arch/manager/cmdgen/set-v1.py b/examples/v3arch/manager/cmdgen/set-v1.py index a452cab..8a894c9 100644 --- a/examples/v3arch/manager/cmdgen/set-v1.py +++ b/examples/v3arch/manager/cmdgen/set-v1.py @@ -57,7 +57,7 @@ def cbFun(sendRequestHandle, elif errorStatus and errorStatus != 2: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBinds[-1][int(errorIndex)-1] or '?' + errorIndex and varBinds[int(errorIndex)-1][0] or '?' ) ) else: diff --git a/examples/v3arch/manager/cmdgen/set-v2c.py b/examples/v3arch/manager/cmdgen/set-v2c.py index ea409ea..8a7ceb7 100644 --- a/examples/v3arch/manager/cmdgen/set-v2c.py +++ b/examples/v3arch/manager/cmdgen/set-v2c.py @@ -55,7 +55,7 @@ def cbFun(sendRequestHandle, elif errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBinds[-1][int(errorIndex)-1] or '?' + errorIndex and varBinds[int(errorIndex)-1][0] or '?' ) ) else: diff --git a/examples/v3arch/manager/cmdgen/set-v3.py b/examples/v3arch/manager/cmdgen/set-v3.py index 0d71ab6..ebcf756 100644 --- a/examples/v3arch/manager/cmdgen/set-v3.py +++ b/examples/v3arch/manager/cmdgen/set-v3.py @@ -56,7 +56,7 @@ def cbFun(sendRequestHandle, elif errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), - errorIndex and varBinds[-1][int(errorIndex)-1] or '?' + errorIndex and varBinds[int(errorIndex)-1][0] or '?' ) ) else: |