Hello,
I found a misleading error message in a try except block. This message
should only be printed in the case of a poorly formed openflow message,
however it was being printed for almost every exception. Patch is attached.
Thanks,
Matt
From 8424e0ee215767e6ec767b21d229f0c15dd512fc Mon Sep 17 00:00:00 2001
From: Matt Moskowitz <m...@bestateless.com>
Date: Fri, 6 Oct 2017 21:08:41 -0600
Subject: [PATCH] add exception type to except
Signed-off-by: Matt Moskowitz <m...@bestateless.com>
---
ryu/ofproto/ofproto_parser.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ryu/ofproto/ofproto_parser.py b/ryu/ofproto/ofproto_parser.py
index e2300558..4dd7f88d 100644
--- a/ryu/ofproto/ofproto_parser.py
+++ b/ryu/ofproto/ofproto_parser.py
@@ -67,7 +67,7 @@ def msg(datapath, version, msg_type, msg_len, xid, buf):
msg = msg_parser(datapath, version, msg_type, msg_len, xid, buf)
except exception.OFPTruncatedMessage as e:
raise e
- except:
+ except exception.OFPMalformedMessage:
LOG.exception(
'Encountered an error while parsing OpenFlow packet from switch. '
'This implies the switch sent a malformed OpenFlow packet. '
--
2.11.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel