Skip to content

Commit 16cb597

Browse files
committed
fixup! Allow specifying reencode's tmp dir
1 parent 560330e commit 16cb597

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/zimscraperlib/video/encoding.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from copy import deepcopy
66

77
from zimscraperlib import logger
8+
from zimscraperlib.filesystem import path_from
89
from zimscraperlib.logging import nicer_args_join
910

1011

@@ -53,7 +54,7 @@ def reencode(
5354
failsafe - Run in failsafe mode
5455
"""
5556

56-
with existing_tmp_path or tempfile.TemporaryDirectory() as tmp_dir:
57+
with path_from(existing_tmp_path or tempfile.TemporaryDirectory()) as tmp_dir:
5758

5859
tmp_path = pathlib.Path(tmp_dir).joinpath(f"video.tmp{dst_path.suffix}")
5960
args = _build_ffmpeg_args(

0 commit comments

Comments
 (0)