mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
docs: Fix deprecation warnings in post-processor
Fixes #1502 Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
7295a6d9cc
commit
bc6ce14cdb
@ -59,7 +59,7 @@ def subcommand_remove_footer(arguments):
|
||||
|
||||
# The footer will always be in the last <section>
|
||||
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 <informaltable> is reached
|
||||
while last_section[-1].tag != 'informaltable':
|
||||
last_section.remove(last_section[-1])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user