Switched to spooled tmpfile
This commit is contained in:
parent
6219c425b7
commit
6319cf89bf
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ class ReadSwash:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def read_nohead(cls, path):
|
def read_nohead(cls, path):
|
||||||
with tempfile.TemporaryFile() as tmpfile:
|
with tempfile.SpooledTemporaryFile() as tmpfile:
|
||||||
with open(path) as file:
|
with open(path) as file:
|
||||||
subprocess.run(("tr", "-d", "\n"), stdin=file, stdout=tmpfile)
|
subprocess.run(("tr", "-d", "\n"), stdin=file, stdout=tmpfile)
|
||||||
tmpfile.seek(0)
|
tmpfile.seek(0)
|
||||||
|
|
Loading…
Reference in a new issue