~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/util/_bencode_py.py

  • Committer: Martin
  • Date: 2010-05-03 20:55:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5204.
  • Revision ID: gzlist@googlemail.com-20100503205505-okdad5rbf12osway
Include OverflowError in error types bencode translates, as Python 2.4 raises that rather than IndexError in some situations

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
            raise TypeError
91
91
        try:
92
92
            r, l = self.decode_func[x[0]](x, 0)
93
 
        except (IndexError, KeyError):
 
93
        except (IndexError, KeyError, OverflowError):
94
94
            raise ValueError
95
95
        if l != len(x):
96
96
            raise ValueError