/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/pack.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from __future__ import absolute_import
24
24
 
25
 
from cStringIO import StringIO
26
25
import re
27
26
 
28
 
from bzrlib import errors
 
27
from . import errors
 
28
from .sixish import (
 
29
    BytesIO,
 
30
    )
29
31
 
30
32
 
31
33
FORMAT_ONE = "Bazaar pack format 1 (introduced in 0.18)"
57
59
    """
58
60
    try:
59
61
        name.decode('utf-8')
60
 
    except UnicodeDecodeError, e:
 
62
    except UnicodeDecodeError as e:
61
63
        raise errors.InvalidRecordError(str(e))
62
64
 
63
65
 
194
196
            self._string.tell() == self._string_length):
195
197
            offset, data = self.readv_result.next()
196
198
            self._string_length = len(data)
197
 
            self._string = StringIO(data)
 
199
            self._string = BytesIO(data)
198
200
 
199
201
    def read(self, length):
200
202
        self._next()