1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-09-28 22:15:23 +08:00

wrong super() call, typos

This commit is contained in:
Joel Bender 2016-05-02 21:38:03 -04:00
parent 23893cf181
commit 970c47ec8d

View File

@ -26,7 +26,7 @@ class Trapper(object):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
if _debug: Trapper._debug("__init__ %r %r", args, kwargs) if _debug: Trapper._debug("__init__ %r %r", args, kwargs)
super(Trapper, self).__init__(self, *args, **kwargs) super(Trapper, self).__init__(*args, **kwargs)
# reset to initialize # reset to initialize
self.reset() self.reset()
@ -42,7 +42,7 @@ class Trapper(object):
self.unexpected_receive_pdu = None self.unexpected_receive_pdu = None
# continue # continue
super(Trapper, self).reset(self) super(Trapper, self).reset()
def before_send(self, pdu): def before_send(self, pdu):
"""Called before each PDU about to be sent.""" """Called before each PDU about to be sent."""
@ -52,7 +52,7 @@ class Trapper(object):
self.before_send_pdu = pdu self.before_send_pdu = pdu
# continue # continue
super(Trapper, self).before_send(self, pdu) super(Trapper, self).before_send(pdu)
def after_send(self, pdu): def after_send(self, pdu):
"""Called after each PDU sent.""" """Called after each PDU sent."""
@ -62,7 +62,7 @@ class Trapper(object):
self.after_send_pdu = pdu self.after_send_pdu = pdu
# continue # continue
super(Trapper, self).after_send(self, pdu) super(Trapper, self).after_send(pdu)
def before_receive(self, pdu): def before_receive(self, pdu):
"""Called with each PDU received before matching.""" """Called with each PDU received before matching."""
@ -72,7 +72,7 @@ class Trapper(object):
self.before_receive_pdu = pdu self.before_receive_pdu = pdu
# continue # continue
super(Trapper, self).before_receive(self, pdu) super(Trapper, self).before_receive(pdu)
def after_receive(self, pdu): def after_receive(self, pdu):
"""Called with PDU received after match.""" """Called with PDU received after match."""
@ -82,7 +82,7 @@ class Trapper(object):
self.after_receive_pdu = pdu self.after_receive_pdu = pdu
# continue # continue
super(Trapper, self).after_receive(self, pdu) super(Trapper, self).after_receive(pdu)
def unexpected_receive(self, pdu): def unexpected_receive(self, pdu):
"""Called with PDU that did not match. Unless this is trapped by the """Called with PDU that did not match. Unless this is trapped by the
@ -93,7 +93,7 @@ class Trapper(object):
self.unexpected_receive_pdu = pdu self.unexpected_receive_pdu = pdu
# continue # continue
super(Trapper, self).unexpected_receive(self, pdu) super(Trapper, self).unexpected_receive(pdu)
@bacpypes_debugging @bacpypes_debugging
@ -107,21 +107,10 @@ class TrappedState(Trapper, State):
pass pass
@bacpypes_debugging @bacpypes_debugging
class TrappedStateMachine(Trapper, StateMachine): class TrappedStateMachine(Trapper, StateMachine):
"""
This class is a simple wrapper around the StateMachine class that keeps the
latest copy of the pdu parameter in the before_send(), after_send(),
before_receive(), after_receive() and unexpected_receive() calls.
"""
pass
@bacpypes_debugging
class TrappedStateMachine(StateMachine):
""" """
This class is a simple wrapper around the StateMachine class that keeps the This class is a simple wrapper around the StateMachine class that keeps the
latest copy of the pdu parameter in the before_send(), after_send(), latest copy of the pdu parameter in the before_send(), after_send(),