~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-07-22 18:18:34 UTC
  • mfrom: (4537.2.1 1.18-absent-content)
  • Revision ID: pqm@pqm.ubuntu.com-20090722181834-2geyfaa06s9himqg
(jam) Add AbsentContentFactory.get_bytes_as,
        which just raises a better error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
        self.key = key
176
176
        self.parents = None
177
177
 
 
178
    def get_bytes_as(self, storage_kind):
 
179
        raise ValueError('A request was made for key: %s, but that'
 
180
                         ' content is not available, and the calling'
 
181
                         ' code does not handle if it is missing.'
 
182
                         % (self.key,))
 
183
 
178
184
 
179
185
class AdapterFactory(ContentFactory):
180
186
    """A content factory to adapt between key prefix's."""