~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Aaron Bentley
  • Date: 2007-07-20 20:27:07 UTC
  • mto: (1551.19.24 Aaron's mergeable stuff)
  • mto: This revision was merged to the branch mainline in revision 2644.
  • Revision ID: abentley@panoramicfeedback.com-20070720202707-x6qb9p0ib510s5x7
Raise NoSuchId when get_file_sha1 is invoked with a baed file id

Show diffs side-by-side

added added

removed removed

Lines of Context:
408
408
    def get_file_sha1(self, file_id, path=None, stat_value=None):
409
409
        # check file id is valid unconditionally.
410
410
        entry = self._get_entry(file_id=file_id, path=path)
411
 
        assert entry[0] is not None, 'what error should this raise'
 
411
        if entry[0] is None:
 
412
            raise errors.NoSuchId(self, file_id)
412
413
        if path is None:
413
414
            path = pathjoin(entry[0][0], entry[0][1]).decode('utf8')
414
415