1
Fork 0

Switched to local on disk tmpfile

This commit is contained in:
Edgar P. Burkhart 2022-03-15 10:39:08 +01:00
parent 03c691f41a
commit b29d77a465
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -14,7 +14,7 @@ class ReadSwash:
@classmethod
def read_nohead(cls, path):
with tempfile.SpooledTemporaryFile() as tmpfile:
with tempfile.NamedTemporaryFile(dir=path.parent) as tmpfile:
with open(path) as file:
subprocess.run(("tr", "-d", "\n"), stdin=file, stdout=tmpfile)
tmpfile.seek(0)