~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Robert Collins
  • Date: 2006-01-25 01:43:34 UTC
  • mto: (1534.1.15 integration)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: robertc@robertcollins.net-20060125014334-8dd9ed73c26c5956
Implement final review suggestions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
        :return: A lock object, which should be passed to Transport.unlock()
232
232
        """
233
233
        from bzrlib.lock import ReadLock
234
 
        return ReadLock(self.abspath(relpath))
 
234
        path = relpath
 
235
        try:
 
236
            path = self.abspath(relpath)
 
237
            return ReadLock(path)
 
238
        except (IOError, OSError), e:
 
239
            self._translate_error(e, path)
235
240
 
236
241
    def lock_write(self, relpath):
237
242
        """Lock the given file for exclusive (write) access.