~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/protocol.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
 
63
63
def _encode_tuple(args):
64
64
    """Encode the tuple args to a bytestream."""
65
 
    joined = '\x01'.join(args) + '\n'
66
 
    if type(joined) is unicode:
67
 
        # XXX: We should fix things so this never happens!  -AJB, 20100304
68
 
        mutter('response args contain unicode, should be only bytes: %r',
69
 
               joined)
70
 
        joined = joined.encode('ascii')
71
 
    return joined
 
65
    return '\x01'.join(args) + '\n'
72
66
 
73
67
 
74
68
class Requester(object):
1231
1225
                    if first_chunk is None:
1232
1226
                        first_chunk = chunk
1233
1227
                    self._write_prefixed_body(chunk)
1234
 
                    self.flush()
1235
1228
                    if 'hpssdetail' in debug.debug_flags:
1236
1229
                        # Not worth timing separately, as _write_func is
1237
1230
                        # actually buffered