From 604e19be95f13c5e3b4396c3e747a2ee957b1893 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 15 Jun 2015 15:14:28 +0100 Subject: Fix: find_child errors on text children --- mammoth/docx/xmlparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mammoth/docx/xmlparser.py') diff --git a/mammoth/docx/xmlparser.py b/mammoth/docx/xmlparser.py index 2cfe1e0..43d5eb4 100644 --- a/mammoth/docx/xmlparser.py +++ b/mammoth/docx/xmlparser.py @@ -9,7 +9,7 @@ class XmlElement(XmlElementBase): def find_child(self, name): for child in self.children: - if child.name == name: + if isinstance(child, XmlElement) and child.name == name: return child -- cgit v1.2.3