Hi Matt,
Thank you for submitting your patch!
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. '
As you said, this "except" statement is too broad but left it with the
historical reason IIRC.
"msg_parser", which will be "parser" method of each message class in
"ofproto_v1_*_parser.py",
can raise too various exceptions (mostly "struct.error", I guess), so except
"Exception" here.
We need detect all exception types, if specify exception class.
Thanks,
Iwase
On 2017年10月07日 12:17, Matthew Moskowitz wrote:
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
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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