mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 15:06:50 +08:00
Refactor:remove useless try catch for ppt parser (#12063)
### What problem does this PR solve? remove useless try catch for ppt parser ### Type of change - [x] Refactoring
This commit is contained in:
@ -88,12 +88,9 @@ class RAGFlowPptParser:
|
|||||||
texts = []
|
texts = []
|
||||||
for shape in sorted(
|
for shape in sorted(
|
||||||
slide.shapes, key=lambda x: ((x.top if x.top is not None else 0) // 10, x.left if x.left is not None else 0)):
|
slide.shapes, key=lambda x: ((x.top if x.top is not None else 0) // 10, x.left if x.left is not None else 0)):
|
||||||
try:
|
txt = self.__extract(shape)
|
||||||
txt = self.__extract(shape)
|
if txt:
|
||||||
if txt:
|
texts.append(txt)
|
||||||
texts.append(txt)
|
|
||||||
except Exception as e:
|
|
||||||
logging.exception(e)
|
|
||||||
txts.append("\n".join(texts))
|
txts.append("\n".join(texts))
|
||||||
|
|
||||||
return txts
|
return txts
|
||||||
|
|||||||
Reference in New Issue
Block a user