struct.unpack_from() is needed in place of struct.unpack() when an offset argument is passed.
Signed-off-by: Simon Horman <[email protected]> --- ryu/ofproto/ofproto_v1_0_parser.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ryu/ofproto/ofproto_v1_0_parser.py b/ryu/ofproto/ofproto_v1_0_parser.py index a15fc30..6846665 100644 --- a/ryu/ofproto/ofproto_v1_0_parser.py +++ b/ryu/ofproto/ofproto_v1_0_parser.py @@ -381,7 +381,7 @@ class OFPFlowStats(object): def parser(cls, buf, offset): flow_stats = cls() - flow_stats.length, flow_stats.table_id = struct.unpack( + flow_stats.length, flow_stats.table_id = struct.unpack_from( ofproto_v1_0.OFP_FLOW_STATS_0_PACK_STR, buf, offset) offset += ofproto_v1_0.OFP_FLOW_STATS_0_SIZE -- 1.7.6.3 ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
