If there is an empty value in the reply msg, there are cases where those methods cause an error. This patch fixes this problem.
Signed-off-by: Minoru TAKAHASHI <[email protected]> --- ryu/lib/ofctl_v1_0.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ryu/lib/ofctl_v1_0.py b/ryu/lib/ofctl_v1_0.py index 97ffa7b..55efc7f 100644 --- a/ryu/lib/ofctl_v1_0.py +++ b/ryu/lib/ofctl_v1_0.py @@ -302,6 +302,7 @@ def get_desc_stats(dp, waiters): stats = dp.ofproto_parser.OFPDescStatsRequest(dp, 0) msgs = [] send_stats_request(dp, stats, waiters, msgs) + s = {} for msg in msgs: stats = msg.body @@ -390,7 +391,7 @@ def get_aggregate_flow_stats(dp, waiters, flow=None): s = {'packet_count': st.packet_count, 'byte_count': st.byte_count, 'flow_count': st.flow_count} - flows.append(s) + flows.append(s) flows = {str(dp.id): flows} return flows -- 1.9.1 ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
