mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 12:26:11 +02:00
packet lib: provide a default impl of __len__
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
55aa474893
commit
39c9718210
@ -40,6 +40,9 @@ class PacketBase(object):
|
||||
def __init__(self):
|
||||
super(PacketBase, self).__init__()
|
||||
|
||||
def __len__(self):
|
||||
return self._MIN_LEN
|
||||
|
||||
@property
|
||||
def protocol_name(self):
|
||||
return self.__class__.__name__
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user