From bc6ce14cdb9f75042eb540c8fce8ee6cb9787989 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 13 Feb 2019 15:08:56 +0530 Subject: [PATCH] docs: Fix deprecation warnings in post-processor Fixes #1502 Signed-off-by: Joseph Nuthalapati Reviewed-by: Sunil Mohan Adapa --- doc/post-processor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/post-processor b/doc/post-processor index 8ac9825fb..fba619fc2 100755 --- a/doc/post-processor +++ b/doc/post-processor @@ -59,7 +59,7 @@ def subcommand_remove_footer(arguments): # The footer will always be in the last
def find_last_section(elem): - if elem.getchildren(): + if len(elem): last_element = elem[-1] if last_element.tag == 'section': return find_last_section(last_element) @@ -67,7 +67,7 @@ def subcommand_remove_footer(arguments): last_section = find_last_section(root) - if last_section.getchildren(): + if len(last_section): # Remove all elements till is reached while last_section[-1].tag != 'informaltable': last_section.remove(last_section[-1])