diff options
Diffstat (limited to 'mammoth')
| -rw-r--r-- | mammoth/docx/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/docx/__init__.py b/mammoth/docx/__init__.py index 8ecf8c9..b155cff 100644 --- a/mammoth/docx/__init__.py +++ b/mammoth/docx/__init__.py @@ -77,7 +77,7 @@ def _find_document_filename(zip_file, relationships): ] + ["word/document.xml"] valid_targets = list(filter(lambda target: zip_file.exists(target), targets)) if len(valid_targets) == 0: - return None + raise IOError("Could not find main document part. Are you sure this is a valid .docx file?") else: return valid_targets[0] |
