/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/smart/protocol.py

  • Committer: Martin
  • Date: 2017-05-21 18:16:32 UTC
  • mto: (6621.2.22 py3)
  • mto: This revision was merged to the branch mainline in revision 6624.
  • Revision ID: gzlist@googlemail.com-20170521181632-kll0wqnsq8pipfpj
Use BytesIO or StringIO from bzrlib.sixish

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from __future__ import absolute_import
22
22
 
23
23
import collections
24
 
from cStringIO import StringIO
25
24
import struct
26
25
import sys
27
26
import thread
34
33
    osutils,
35
34
    )
36
35
from bzrlib.sixish import (
 
36
    BytesIO,
37
37
    reraise,
38
38
)
39
39
from bzrlib.smart import message, request
779
779
                    "Connection lost while reading response body.")
780
780
            _body_decoder.accept_bytes(bytes)
781
781
        self._request.finished_reading()
782
 
        self._body_buffer = StringIO(_body_decoder.read_pending_data())
 
782
        self._body_buffer = BytesIO(_body_decoder.read_pending_data())
783
783
        # XXX: TODO check the trailer result.
784
784
        if 'hpss' in debug.debug_flags:
785
785
            mutter('              %d body bytes read',