/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 breezy/pack.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

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 breezy 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()