mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-17 15:22:10 +00:00
disable exc masking
This commit is contained in:
+4
-4
@@ -30,7 +30,7 @@ def is_tex_attachment(att, max_mb: int) -> bool:
|
||||
|
||||
|
||||
async def run_latex_two_passes(
|
||||
tex_filename: str, workdir: Path, tex_engine: str, timeout_sec: int, logger=None
|
||||
tex_filename: str, workdir: Path, tex_engine: str, timeout_sec: int, logger:str=None
|
||||
) -> Tuple[bool, str, Path]:
|
||||
cmd = f"{tex_engine} -interaction=nonstopmode -halt-on-error -file-line-error -no-shell-escape {shlex.quote(tex_filename)}"
|
||||
logger = logging.getLogger(logger) if logger else None
|
||||
@@ -52,7 +52,7 @@ async def run_latex_two_passes(
|
||||
try:
|
||||
proc.kill()
|
||||
except Exception:
|
||||
pass
|
||||
raise
|
||||
return 124, f"[Timeout] Compilation exceeded {timeout_sec}s.\n"
|
||||
|
||||
logs: List[str] = []
|
||||
@@ -75,7 +75,7 @@ async def run_latex_two_passes(
|
||||
|
||||
|
||||
async def compile_single_tex_bytes(
|
||||
tex_bytes: bytes, filename: str, tex_engine: str, timeout_sec: int, logger=None
|
||||
tex_bytes: bytes, filename: str, tex_engine: str, timeout_sec: int, logger:str=None
|
||||
) -> Dict[str, Optional[object]]:
|
||||
if not is_safe_tex_name(filename):
|
||||
return {
|
||||
@@ -107,7 +107,7 @@ async def compile_single_tex_bytes(
|
||||
|
||||
|
||||
async def compile_zip_to_zip(
|
||||
zip_bytes: bytes, tex_engine: str, timeout_sec: int, logger=None
|
||||
zip_bytes: bytes, tex_engine: str, timeout_sec: int, logger:str=None
|
||||
) -> Tuple[bytes, List[str]]:
|
||||
failed: List[str] = []
|
||||
out_pdf_paths: List[Path] = []
|
||||
|
||||
Reference in New Issue
Block a user