File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 2
2
#
3
3
# SPDX-License-Identifier: MIT
4
4
5
- from ._markitdown import MarkItDown
5
+ from ._markitdown import MarkItDown , FileConversionException , UnsupportedFormatException
6
6
7
7
__all__ = [
8
8
"MarkItDown" ,
9
+ "FileConversionException" ,
10
+ "UnsupportedFormatException" ,
9
11
]
Original file line number Diff line number Diff line change @@ -999,7 +999,8 @@ def convert_response(
999
999
fh .close ()
1000
1000
1001
1001
# 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 )
1003
1004
1004
1005
# Convert
1005
1006
result = self ._convert (temp_path , extensions , url = response .url )
@@ -1093,7 +1094,7 @@ def _guess_ext_magic(self, path):
1093
1094
pass
1094
1095
except PermissionError :
1095
1096
pass
1096
- return None
1097
+ return []
1097
1098
1098
1099
def register_page_converter (self , converter : DocumentConverter ) -> None :
1099
1100
"""Register a page text converter."""
You can’t perform that action at this time.
0 commit comments