From 8fd3959d0680db272a040e0fe8c0a8a31f457518 Mon Sep 17 00:00:00 2001 From: Satoshi Kobayashi Date: Thu, 13 Mar 2014 07:04:50 +0000 Subject: [PATCH] ofctl_v1_3: Fix unsuitable log ofproto_v1_3.OFPGT_ALL is 0 and 0 is False on Python. When using type 'ALL', the following is set to True. if not type_: LOG.debug('Unknown type: %s', group.get('type')) Therefore, the log unsuitable is outputted: Unknown type: ALL Signed-off-by: Satoshi Kobayashi Signed-off-by: FUJITA Tomonori --- ryu/lib/ofctl_v1_3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py index 403c82e2..1f0fd30a 100644 --- a/ryu/lib/ofctl_v1_3.py +++ b/ryu/lib/ofctl_v1_3.py @@ -863,7 +863,7 @@ def mod_group_entry(dp, group, cmd): 'FF': dp.ofproto.OFPGT_FF} type_ = type_convert.get(group.get('type')) - if not type_: + if type_ is None: LOG.debug('Unknown type: %s', group.get('type')) group_id = int(group.get('group_id', 0))