ofconfig: use ElementTree iterator instead of getchildren

getchildren is documented to be obsolete.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
YAMAMOTO Takashi 2013-03-08 18:45:12 +09:00 committed by FUJITA Tomonori
parent 2ac7a9cf6c
commit 4c0b438c4f

View File

@ -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