Skip to content

Commit

Permalink
Merge r951585 from trunk to 1.3 branch. Fixes: AVRO-526.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/avro/branches/branch-1.3@951587 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Jeffrey Evan Hammerbacher committed Jun 4, 2010
1 parent 221bc1a commit cb61f04
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lang/py/src/avro/datafile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"""
import zlib
import uuid
import cStringIO
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from avro import schema
from avro import io

Expand Down Expand Up @@ -74,7 +77,7 @@ def __init__(self, writer, datum_writer, writers_schema=None, codec='null'):
self._writer = writer
self._encoder = io.BinaryEncoder(writer)
self._datum_writer = datum_writer
self._buffer_writer = cStringIO.StringIO()
self._buffer_writer = StringIO()
self._buffer_encoder = io.BinaryEncoder(self._buffer_writer)
self._block_count = 0
self._meta = {}
Expand Down Expand Up @@ -285,7 +288,7 @@ def _read_block_header(self):
# -15 is the log of the window size; negative indicates
# "raw" (no zlib headers) decompression. See zlib.h.
uncompressed = zlib.decompress(data, -15)
self._datum_decoder = io.BinaryDecoder(cStringIO.StringIO(uncompressed))
self._datum_decoder = io.BinaryDecoder(StringIO(uncompressed))

def _skip_sync(self):
"""
Expand Down

0 comments on commit cb61f04

Please sign in to comment.