fix(server-release): 修复 MinerU 本地解析两处语法错误

1. 移除 cmd 数组中多余的 "--" 参数,导致 -p/--path 无法识别
2. finally 块中 "清理临时目录" 缺少 # 注释符,触发 NameError
This commit is contained in:
lacerate551
2026-06-20 21:33:13 +08:00
parent 8f75c51c59
commit 8d60616124

View File

@@ -814,7 +814,6 @@ def parse_with_mineru(
cmd = [
str(mineru_exe),
"--",
"-p", str(file_path),
"-o", str(output_dir),
"-m", "auto",
@@ -859,7 +858,7 @@ def parse_with_mineru(
logger.error(f"MinerU 解析失败: {e}")
raise
finally:
清理临时目录
# 清理临时目录
if cleanup_output and os.path.exists(output_dir):
shutil.rmtree(output_dir, ignore_errors=True)