Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from JohnEmhoff/seek-to-zero-after-flush
Browse files Browse the repository at this point in the history
Seek the write buffer to zero after flushing
  • Loading branch information
tenth10th authored Feb 21, 2020
2 parents 6a6c32d + b01992f commit 74ef7d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
matrix:
include:
- python: 3.3
dist: trusty
sudo: true
- python: 3.7
dist: xenial
sudo: true
Expand Down
3 changes: 2 additions & 1 deletion src/spavro/datafile.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ def _write_block(self):
self.writer.write(self.sync_marker)

# reset buffer
self.buffer_writer.truncate(0)
self.buffer_writer.truncate(0)
self.buffer_writer.seek(0)
self.block_count = 0

def append(self, datum):
Expand Down

0 comments on commit 74ef7d8

Please sign in to comment.