Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Fix closing recordio files from pyapi (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
JDzvonik authored and ringgaard committed Dec 20, 2019
1 parent 3000f6f commit 551f3f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sling/pyapi/pyrecordio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int PyRecordReader::Init(PyObject *args, PyObject *kwds) {
if (!CheckIO(File::Open(filename, "r", &f))) return -1;

// Create record reader.
reader = new RecordReader(filename, options);
reader = new RecordReader(f, options);
return 0;
}

Expand Down Expand Up @@ -276,7 +276,7 @@ int PyRecordWriter::Init(PyObject *args, PyObject *kwds) {
if (!CheckIO(File::Open(filename, "w", &f))) return -1;

// Create record writer.
writer = new RecordWriter(filename, options);
writer = new RecordWriter(f, options);

return 0;
}
Expand Down

0 comments on commit 551f3f4

Please sign in to comment.