mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 04:16:11 +02:00
ryu/lib/packet/packet.py: should use isinstance instead of __class__.__base__
The current implementation doesn't allow inheriting twice from class PacketBase. 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
e0bcd61f92
commit
826d727d54
@ -42,7 +42,7 @@ class Packet(object):
|
||||
self.data = bytearray()
|
||||
r = self.protocols[::-1]
|
||||
for i, p in enumerate(r):
|
||||
if p.__class__.__bases__[0] == packet_base.PacketBase:
|
||||
if isinstance(p, packet_base.PacketBase):
|
||||
if i == len(r) - 1:
|
||||
prev = None
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user