Merge pull request #35 from gerrat/master

Removed tuple unpacking in function signatures in twisted
pull/36/head
Ilya Etingof 2016-12-22 01:20:06 +01:00 committed by GitHub
commit 631b774c65
11 changed files with 35 additions and 14 deletions

View File

@ -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,

View File

@ -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(),

View File

@ -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(),

View File

@ -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(),

View File

@ -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, varBinds) = args
if errorStatus:
print('%s: %s at %s' % (hostname,
errorStatus.prettyPrint(),

View File

@ -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(),

View File

@ -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(),

View File

@ -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(),

View File

@ -21,4 +21,4 @@ class AbstractTwistedTransport(AbstractTransport):
def __init__(self, sock=None, sockMap=None):
self._writeQ = []
DgramTwistedTransport.__init__(self)
# DgramTwistedTransport.__init__(self)

View File

@ -88,7 +88,8 @@ def getCmd(snmpEngine, authData, transportTarget, contextData,
>>> from twisted.internet.task import react
>>> from pysnmp.hlapi.twisted import *
>>>
>>> def success((errorStatus, errorIndex, varBinds)):
>>> def success(args):
... (errorStatus, errorIndex, varBinds) = args
... print(errorStatus, errorIndex, varBind)
...
>>> def failure(errorIndication):
@ -199,7 +200,8 @@ def setCmd(snmpEngine, authData, transportTarget, contextData,
>>> from twisted.internet.task import react
>>> from pysnmp.hlapi.twisted import *
>>>
>>> def success((errorStatus, errorIndex, varBinds)):
>>> def success(args):
... (errorStatus, errorIndex, varBinds) = args
... print(errorStatus, errorIndex, varBind)
...
>>> def failure(errorIndication):
@ -314,7 +316,8 @@ def nextCmd(snmpEngine, authData, transportTarget, contextData,
>>> from twisted.internet.task import react
>>> from pysnmp.hlapi.twisted import *
>>>
>>> def success((errorStatus, errorIndex, varBindTable)):
>>> def success(args):
... (errorStatus, errorIndex, varBindTable) = args
... print(errorStatus, errorIndex, varBindTable)
...
>>> def failure(errorIndication):
@ -439,7 +442,8 @@ def bulkCmd(snmpEngine, authData, transportTarget, contextData,
>>> from twisted.internet.task import react
>>> from pysnmp.hlapi.twisted import *
>>>
>>> def success((errorStatus, errorIndex, varBindTable)):
>>> def success(args):
... (errorStatus, errorIndex, varBindTable) = args
... print(errorStatus, errorIndex, varBindTable)
...
>>> def failure(errorIndication):

View File

@ -95,7 +95,8 @@ def sendNotification(snmpEngine, authData, transportTarget, contextData,
>>> from twisted.internet.task import react
>>> from pysnmp.hlapi.twisted import *
>>>
>>> def success((errorStatus, errorIndex, varBinds)):
>>> def success(args):
... (errorStatus, errorIndex, varBinds) = args
... print(errorStatus, errorIndex, varBind)
...
>>> def failure(errorIndication):