mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 13:56:09 +02:00
lib/packet: make protocol_name property instead of attributes
Because it is read-only and to prevent accidental over-write. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
5694ddb74f
commit
43e83726ae
@ -37,7 +37,10 @@ class PacketBase(object):
|
||||
def __init__(self):
|
||||
super(PacketBase, self).__init__()
|
||||
self.length = 0
|
||||
self.protocol_name = self.__class__.__name__
|
||||
|
||||
@property
|
||||
def protocol_name(self):
|
||||
return self.__class__.__name__
|
||||
|
||||
@classmethod
|
||||
def parser(cls, buf):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user