summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2013-04-01 11:58:49 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-04-02 12:01:19 +0900
commit826d727d5466ec0378ea1d54ad4471d8f6e289f6 (patch)
treeb88d20f0fa95a6576f6388b7fc82e9647697d91c
parente0bcd61f92dbfd1fd9b6acc7387ec531449dcbac (diff)
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>
-rw-r--r--ryu/lib/packet/packet.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py
index a461eeea..da9c412d 100644
--- a/ryu/lib/packet/packet.py
+++ b/ryu/lib/packet/packet.py
@@ -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: