From 34499b280033bf1c1ad147fa2af3ad9edebd42ee Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 20 May 2023 20:49:13 +0100 Subject: Fix Python 2.7 support --- mammoth/docx/body_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index 09ad744..f880c72 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -154,7 +154,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f children_xml = element.children if deleted_paragraph_contents: children_xml = deleted_paragraph_contents + children_xml - deleted_paragraph_contents.clear() + del deleted_paragraph_contents[:] return _ReadResult.map_results( _read_paragraph_style(properties), -- cgit v1.2.3