From 03c691f41a9ef6cd02e7c793d2d0289c8043a1b6 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)