diff options
Diffstat (limited to 'mammoth/docx/body_xml.py')
| -rw-r--r-- | mammoth/docx/body_xml.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index 2b04985..680dede 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -4,7 +4,6 @@ from .. import documents from .. import results from .. import lists from .xmlparser import node_types -from .files import InvalidFileReferenceError def reader(numbering=None, @@ -202,13 +201,8 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f return _read_image(lambda: _find_blip_image(element), alt_text) def _read_image(find_image, alt_text): - try: - image_path, open_image = find_image() - except InvalidFileReferenceError as error: - return _empty_result_with_messages([results.warning(str(error))]) - + image_path, open_image = find_image() content_type = content_types.find_content_type(image_path) - image = documents.image(alt_text=alt_text, content_type=content_type, open=open_image) if content_type in ["image/png", "image/gif", "image/jpeg", "image/svg+xml", "image/tiff"]: @@ -245,8 +239,6 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f def open_image(): return files.open(image_path) - files.verify(image_path) - return image_path, open_image def read_imagedata(element): |
