/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/_knit_load_data_py.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:
16
16
 
17
17
from __future__ import absolute_import
18
18
 
19
 
from breezy import errors
 
19
from . import errors
20
20
 
21
21
 
22
22
def _load_data_py(kndx, fp):
52
52
                else:
53
53
                    parent_id = history[int(value)]
54
54
                parents.append(parent_id)
55
 
        except (IndexError, ValueError), e:
 
55
        except (IndexError, ValueError) as e:
56
56
            # The parent could not be decoded to get its parent row. This
57
57
            # at a minimum will cause this row to have wrong parents, or
58
58
            # even to apply a delta to the wrong base and decode
67
67
        version_id = version_id
68
68
        try:
69
69
            pos = int(pos)
70
 
        except ValueError, e:
 
70
        except ValueError as e:
71
71
            raise errors.KnitCorrupt(kndx._filename,
72
72
                                     "invalid position on line %r: %s"
73
73
                                     % (rec, e))
74
74
        try:
75
75
            size = int(size)
76
 
        except ValueError, e:
 
76
        except ValueError as e:
77
77
            raise errors.KnitCorrupt(kndx._filename,
78
78
                                     "invalid size on line %r: %s"
79
79
                                     % (rec, e))