Do not keep full file in memory
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
b6f06b4a27
commit
2fb0b14230
1 changed files with 2 additions and 2 deletions
|
@ -49,9 +49,9 @@ TO '{tmpfile}' delimiter ',' CSV header;
|
|||
' '.join(command), shell=True, stdout=subprocess.PIPE,
|
||||
cwd='/tmp')
|
||||
with open(tempfilename) as stream:
|
||||
data = stream.read()
|
||||
for line in stream:
|
||||
print(line)
|
||||
os.unlink(tempfilename)
|
||||
print(data)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue