~jameinel/bzr/history_denormalization

« back to all changes in this revision

Viewing changes to bzrlib/smart/protocol.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-03-26 05:25:32 UTC
  • mfrom: (5011.3.16 no_until_no_eintr)
  • Revision ID: pqm@pqm.ubuntu.com-20100326052532-9c9bbs1f7hmfr1j4
(andrew) Either correctly handle EINTR or don't handle it at all.
        (#496813)

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
 
    return '\x01'.join(args) + '\n'
 
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
66
72
 
67
73
 
68
74
class Requester(object):