Skip to content

Commit 1296fd9

Browse files
authored
Merge pull request #392 from Yhg1s/same-dir-tempfile
Avoid cross-filesystem renames in svg generation
2 parents 33fe7b4 + 33868b3 commit 1296fd9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: bench_runner/plot.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class Options:
6565
plt.close("all")
6666

6767
if output_filename.suffix == ".svg":
68-
with tempfile.NamedTemporaryFile(delete=False) as tmp:
68+
with tempfile.NamedTemporaryFile(
69+
dir=output_filename.parent, delete=False
70+
) as tmp:
6971
with open(output_filename) as fd:
7072
scour.start(Options(), fd, tmp)
7173
output_filename.unlink()

0 commit comments

Comments
 (0)