Skip to content

Commit eb3e341

Browse files
authored
Merge pull request civisanalytics#246 from waltaskew/flush-buffers
In Which We Flush Buffers After Finishing Writing to Them
2 parents 413e638 + 2ce1a7f commit eb3e341

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
88
pass in tables like schema."tablename.with.periods".
99
- Adding in missing documentation for civis_file_to_table
1010
- Include JSON files with pip distributions (#244)
11+
- Added flush to `civis_to_file` when passed a user-created buffer,
12+
ensuring the buffer contains the entire file when subsequently read.
1113

1214
### Added
1315
- Added a utility function which can robustly split a Redshift schema name

civis/io/_files.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ def civis_to_file(file_id, buf, api_key=None, client=None):
303303
_civis_to_file(file_id, f, api_key=api_key, client=client)
304304
else:
305305
_civis_to_file(file_id, buf, api_key=api_key, client=client)
306+
buf.flush()
306307

307308

308309
def _civis_to_file(file_id, buf, api_key=None, client=None):

0 commit comments

Comments
 (0)