~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/util/_bencode_py.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-18 07:00:11 UTC
  • mto: (4973.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4975.
  • Revision ID: andrew.bennetts@canonical.com-20100118070011-zu374wvd0lcgai5a
Move news_merge plugin from contrib to bzrlib/plugins, change it to be enabled via a 'news_merge_files' config option, move more code out of the __init__ to minimise overhead, and add lots of docstrings, add NEWS entry.

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, OverflowError), e:
94
 
            import sys
95
 
            raise ValueError, ValueError(str(e)), sys.exc_info()[2]
 
93
        except (IndexError, KeyError):
 
94
            raise ValueError
96
95
        if l != len(x):
97
96
            raise ValueError
98
97
        return r