Skip to content

Commit b541c40

Browse files
author
Marcin Kardas
committed
Better error message when source is missing
1 parent 7b1cb03 commit b541c40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sota_extractor2/helpers/unpack.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ def __call__(self, source, dest):
2727
dest.mkdir(parents=True, exist_ok=True)
2828
with gzip.open(source, "rb") as src, open(dest / "main.tex", "wb") as dst:
2929
copyfileobj(src, dst)
30+
elif mime == 'application/pdf':
31+
raise UnpackError(f"No LaTeX source code available for this paper, PDF only")
3032
else:
3133
raise UnpackError(f"Cannot unpack file of type {mime}")

0 commit comments

Comments
 (0)