From 665be6e2763ae712b0febe99d0fc0c50e52e4e30 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Wed, 25 Feb 2015 22:56:23 +0900 Subject: [PATCH] bgp: Prevent __str__() methods from raising exceptions bgp.BadMsg.__str__(): avoid "AttributeError: 'BadMsg' object has no attribute 'msg'" Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/bgp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py index 2f507f0c..81feef31 100644 --- a/ryu/lib/packet/bgp.py +++ b/ryu/lib/packet/bgp.py @@ -276,7 +276,7 @@ class BadMsg(BgpExc): self.data = struct.pack('B', msg_type) def __str__(self): - return '' % (self.msg,) + return '' % (self.msg_type,) # ============================================================================ # OPEN Message Errors