From 6319cf89bf95524ab3307230271e2aab9fab1db3 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 15 Mar 2022 10:35:11 +0100 Subject: [PATCH] Switched to spooled tmpfile --- swash/processing/read_swash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swash/processing/read_swash.py b/swash/processing/read_swash.py index 74b9aea..26a3014 100644 --- a/swash/processing/read_swash.py +++ b/swash/processing/read_swash.py @@ -14,7 +14,7 @@ class ReadSwash: @classmethod def read_nohead(cls, path): - with tempfile.TemporaryFile() as tmpfile: + with tempfile.SpooledTemporaryFile() as tmpfile: with open(path) as file: subprocess.run(("tr", "-d", "\n"), stdin=file, stdout=tmpfile) tmpfile.seek(0)