File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 22#
33# SPDX-License-Identifier: MIT
44
5- from ._markitdown import MarkItDown
5+ from ._markitdown import MarkItDown , FileConversionException , UnsupportedFormatException
66
77__all__ = [
88 "MarkItDown" ,
9+ "FileConversionException" ,
10+ "UnsupportedFormatException" ,
911]
Original file line number Diff line number Diff line change @@ -999,7 +999,8 @@ def convert_response(
999999 fh .close ()
10001000
10011001 # Use puremagic to check for more extension options
1002- self ._append_ext (extensions , self ._guess_ext_magic (temp_path ))
1002+ for g in self ._guess_ext_magic (temp_path ):
1003+ self ._append_ext (extensions , g )
10031004
10041005 # Convert
10051006 result = self ._convert (temp_path , extensions , url = response .url )
@@ -1093,7 +1094,7 @@ def _guess_ext_magic(self, path):
10931094 pass
10941095 except PermissionError :
10951096 pass
1096- return None
1097+ return []
10971098
10981099 def register_page_converter (self , converter : DocumentConverter ) -> None :
10991100 """Register a page text converter."""
You can’t perform that action at this time.
0 commit comments