From 4c0b438c4f549bff0ffce591c5dbcaf1fcfe51da Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 8 Mar 2013 18:45:12 +0900 Subject: [PATCH] ofconfig: use ElementTree iterator instead of getchildren getchildren is documented to be obsolete. Signed-off-by: YAMAMOTO Takashi Signed-off-by: FUJITA Tomonori --- ryu/lib/of_config/capable_switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/lib/of_config/capable_switch.py b/ryu/lib/of_config/capable_switch.py index b067da0f..cce48860 100644 --- a/ryu/lib/of_config/capable_switch.py +++ b/ryu/lib/of_config/capable_switch.py @@ -67,7 +67,7 @@ class OFCapableSwitch(object): def _find_capable_switch(self, tree): capable_switch = None - for element in tree.getchildren(): + for element in tree: ns, tag = get_ns_tag(element.tag) if tag != ofc_consts.CAPABLE_SWITCH: continue