aboutsummaryrefslogtreecommitdiff
path: root/mammoth
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-05-24 09:57:25 +0100
committerMichael Williamson <mike@zwobble.org>2015-05-24 09:57:25 +0100
commit3db53874ec83b67df0a313ee870ed5b55a8641cd (patch)
tree6379af73ddca6eca5cb834bf82229518778640da /mammoth
parentc08fe8c9b5b04c7f3182bf70b0efb1c00c598187 (diff)
Support styles without a name
Diffstat (limited to 'mammoth')
-rw-r--r--mammoth/docx/styles_xml.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/docx/styles_xml.py b/mammoth/docx/styles_xml.py
index ab3cc0f..1166f11 100644
--- a/mammoth/docx/styles_xml.py
+++ b/mammoth/docx/styles_xml.py
@@ -33,7 +33,7 @@ def read_styles_xml_element(element):
def _read_style_element(element):
style_id = element.attributes["w:styleId"]
- name = element.find_child("w:name").attributes["w:val"]
+ name = element.find_child_or_null("w:name").attributes.get("w:val")
return Style(style_id=style_id, name=name)