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:
parent
2ac7a9cf6c
commit
4c0b438c4f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user