diff options
author | Gerrat Rickert <grickert@coldstorage.com> | 2016-12-21 17:01:43 -0500 |
---|---|---|
committer | Gerrat Rickert <grickert@coldstorage.com> | 2016-12-21 17:01:43 -0500 |
commit | 7023d87738b298c6b6588dedebdead26b65904a4 (patch) | |
tree | 3b6aa402c8618188646af1939544acaec42cc983 /examples | |
parent | 023b707f83bb1805dafdcd38ea5b1adfbf83d7e9 (diff) | |
download | pysnmp-git-7023d87738b298c6b6588dedebdead26b65904a4.tar.gz |
Removed tuple unpacking in function signatures in twisted since removed in Python 3
Diffstat (limited to 'examples')
8 files changed, 24 insertions, 8 deletions
diff --git a/examples/hlapi/twisted/agent/ntforg/default-v1-trap.py b/examples/hlapi/twisted/agent/ntforg/default-v1-trap.py index e8b05451..4d1a2700 100644 --- a/examples/hlapi/twisted/agent/ntforg/default-v1-trap.py +++ b/examples/hlapi/twisted/agent/ntforg/default-v1-trap.py @@ -24,7 +24,9 @@ from twisted.internet.task import react from pysnmp.hlapi.twisted import * -def success((errorStatus, errorIndex, varBinds), hostname): +def success(args, hostname): + (errorStatus, errorIndex, varBinds) = args + if errorStatus: print('%s: %s at %s' % ( hostname, diff --git a/examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py b/examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py index fc6fbf3c..e9d199e9 100644 --- a/examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py +++ b/examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py @@ -27,7 +27,9 @@ from twisted.internet.task import react from pysnmp.hlapi.twisted import * -def success((errorStatus, errorIndex, varBinds), hostname): +def success(args, hostname): + (errorStatus, errorIndex, varBinds) = args + if errorStatus: print('%s: %s at %s' % (hostname, errorStatus.prettyPrint(), diff --git a/examples/hlapi/twisted/manager/cmdgen/custom-timeout-and-retries.py b/examples/hlapi/twisted/manager/cmdgen/custom-timeout-and-retries.py index f0419fa7..a1ff7850 100644 --- a/examples/hlapi/twisted/manager/cmdgen/custom-timeout-and-retries.py +++ b/examples/hlapi/twisted/manager/cmdgen/custom-timeout-and-retries.py @@ -19,7 +19,9 @@ from twisted.internet.task import react from pysnmp.hlapi.twisted import * -def success((errorStatus, errorIndex, varBinds), hostname): +def success(args, hostname): + (errorStatus, errorIndex, varBinds) = args + if errorStatus: print('%s: %s at %s' % (hostname, errorStatus.prettyPrint(), diff --git a/examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py b/examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py index e2b3ebb7..d3675451 100644 --- a/examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py +++ b/examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py @@ -20,7 +20,9 @@ from twisted.internet.task import react from pysnmp.hlapi.twisted import * -def success((errorStatus, errorIndex, varBindTable), reactor, snmpEngine): +def success(args, reactor, snmpEngine): + (errorStatus, errorIndex, varBindTable) = args + if errorStatus: print('%s: %s at %s' % (hostname, errorStatus.prettyPrint(), diff --git a/examples/hlapi/twisted/manager/cmdgen/multiple-concurrent-queries.py b/examples/hlapi/twisted/manager/cmdgen/multiple-concurrent-queries.py index 042c8e33..92317cac 100644 --- a/examples/hlapi/twisted/manager/cmdgen/multiple-concurrent-queries.py +++ b/examples/hlapi/twisted/manager/cmdgen/multiple-concurrent-queries.py @@ -22,7 +22,9 @@ from twisted.internet.task import react from pysnmp.hlapi.twisted import * -def success((errorStatus, errorIndex, varBinds), hostname): +def success(args, hostname): + (errorStatus, errorIndex, varBindTable) = args + if errorStatus: print('%s: %s at %s' % (hostname, errorStatus.prettyPrint(), diff --git a/examples/hlapi/twisted/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py b/examples/hlapi/twisted/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py index 179d205f..41d779e6 100644 --- a/examples/hlapi/twisted/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py +++ b/examples/hlapi/twisted/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py @@ -20,7 +20,9 @@ from twisted.internet.task import react from pysnmp.hlapi.twisted import * -def success((errorStatus, errorIndex, varBindTable), reactor, snmpEngine, hostname): +def success(args, reactor, snmpEngine, hostname): + (errorStatus, errorIndex, varBindTable) = args + if errorStatus: print('%s: %s at %s' % (hostname, errorStatus.prettyPrint(), diff --git a/examples/hlapi/twisted/manager/cmdgen/pull-whole-mib.py b/examples/hlapi/twisted/manager/cmdgen/pull-whole-mib.py index e7c7c5fe..b2b245e6 100644 --- a/examples/hlapi/twisted/manager/cmdgen/pull-whole-mib.py +++ b/examples/hlapi/twisted/manager/cmdgen/pull-whole-mib.py @@ -19,7 +19,9 @@ from twisted.internet.task import react from pysnmp.hlapi.twisted import * -def success((errorStatus, errorIndex, varBindTable), reactor, snmpEngine): +def success(args, reactor, snmpEngine): + (errorStatus, errorIndex, varBindTable) = args + if errorStatus: print('%s: %s at %s' % (hostname, errorStatus.prettyPrint(), diff --git a/examples/hlapi/twisted/manager/cmdgen/v1-get.py b/examples/hlapi/twisted/manager/cmdgen/v1-get.py index 6cb2f17e..21719ff7 100644 --- a/examples/hlapi/twisted/manager/cmdgen/v1-get.py +++ b/examples/hlapi/twisted/manager/cmdgen/v1-get.py @@ -19,7 +19,9 @@ from twisted.internet.task import react from pysnmp.hlapi.twisted import * -def success((errorStatus, errorIndex, varBinds), hostname): +def success(args, hostname): + (errorStatus, errorIndex, varBinds) = args + if errorStatus: print('%s: %s at %s' % (hostname, errorStatus.prettyPrint(), |