mirror of
https://github.com/DS4SD/docling.git
synced 2025-08-01 23:12:20 +00:00
fix: Remove unnecessary case handling
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
parent
7df9527733
commit
c8bf252dbd
@ -200,13 +200,10 @@ class DocumentConverter:
|
|||||||
else:
|
else:
|
||||||
yield conv_res
|
yield conv_res
|
||||||
|
|
||||||
if not had_result:
|
if not had_result and raises_on_error:
|
||||||
if raises_on_error:
|
raise RuntimeError(
|
||||||
raise RuntimeError(
|
f"Conversion failed because the provided file has no recognizable format or it wasn't in the list of allowed formats."
|
||||||
f"Conversion failed because the provided file has no recognizable format or it wasn't in the list of allowed formats."
|
)
|
||||||
)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def _convert(
|
def _convert(
|
||||||
self, conv_input: _DocumentConversionInput, raises_on_error: bool
|
self, conv_input: _DocumentConversionInput, raises_on_error: bool
|
||||||
|
Loading…
Reference in New Issue
Block a user