Merge pull request #35 from gerrat/master
Removed tuple unpacking in function signatures in twistedpull/36/head
commit
631b774c65
|
@ -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,
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -21,4 +21,4 @@ class AbstractTwistedTransport(AbstractTransport):
|
|||
|
||||
def __init__(self, sock=None, sockMap=None):
|
||||
self._writeQ = []
|
||||
DgramTwistedTransport.__init__(self)
|
||||
# DgramTwistedTransport.__init__(self)
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue