diff options
author | elie <elie> | 2013-09-07 14:28:40 +0000 |
---|---|---|
committer | elie <elie> | 2013-09-07 14:28:40 +0000 |
commit | a2b420912d07a50616c04f5a0c98675e22316e10 (patch) | |
tree | 63cd8f93cad45426d3c741a170e5e409ff66c2ce /pysnmp/carrier | |
parent | 690ea8ee6ae1ff16b184c8c17a6acda681613b6d (diff) | |
download | pysnmp-git-a2b420912d07a50616c04f5a0c98675e22316e10.tar.gz |
no default data routing function anymore
Diffstat (limited to 'pysnmp/carrier')
-rw-r--r-- | pysnmp/carrier/base.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pysnmp/carrier/base.py b/pysnmp/carrier/base.py index 13ada404..ee2811e1 100644 --- a/pysnmp/carrier/base.py +++ b/pysnmp/carrier/base.py @@ -30,8 +30,7 @@ class AbstractTransportDispatcher: self.__timerResolution = 0.5 self.__timerDelta = self.__timerResolution * 0.05 self.__nextTime = 0 - # default data routing callback function. - self.__routingCbFun = lambda x,y,z: x + self.__routingCbFun = None def _cbFun(self, incomingTransport, transportAddress, incomingMessage): if incomingTransport in self.__transportDomainMap: @@ -41,9 +40,12 @@ class AbstractTransportDispatcher: 'Unregistered transport %s' % (incomingTransport,) ) - recvId = self.__routingCbFun( - transportDomain, transportAddress, incomingMessage - ) + if self.__routingCbFun: + recvId = self.__routingCbFun( + transportDomain, transportAddress, incomingMessage + ) + else: + recvId = None if recvId in self.__recvCallables: self.__recvCallables[recvId]( |