mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-01-23 17:42:16 +01:00
bgp: Prevent __str__() methods from raising exceptions
bgp.BadMsg.__str__(): avoid "AttributeError: 'BadMsg' object has no attribute 'msg'" Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
d1ff39ebab
commit
665be6e276
@ -276,7 +276,7 @@ class BadMsg(BgpExc):
|
||||
self.data = struct.pack('B', msg_type)
|
||||
|
||||
def __str__(self):
|
||||
return '<BadMsg %d>' % (self.msg,)
|
||||
return '<BadMsg %d>' % (self.msg_type,)
|
||||
|
||||
# ============================================================================
|
||||
# OPEN Message Errors
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user