The current implementation doesn't allow inheriting twice from class PacketBase.

Signed-off-by: Isaku Yamahata <[email protected]>
---
 ryu/lib/packet/packet.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py
index a461eee..da9c412 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:
-- 
1.7.10.4


------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to