~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-05 00:34:00 UTC
  • mfrom: (2052.6.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070705003400-d5p03g67nxpohfox
(robertc) Make read() errors on directories raise ReadError not IO errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
393
393
                f.prefetch()
394
394
            return f
395
395
        except (IOError, paramiko.SSHException), e:
396
 
            self._translate_io_exception(e, path, ': error retrieving')
 
396
            self._translate_io_exception(e, path, ': error retrieving',
 
397
                failure_exc=errors.ReadError)
397
398
 
398
399
    def readv(self, relpath, offsets):
399
400
        """See Transport.readv()"""
682
683
        """Create a directory at the given path."""
683
684
        self._mkdir(self._remote_path(relpath), mode=mode)
684
685
 
685
 
    def _translate_io_exception(self, e, path, more_info='', 
 
686
    def _translate_io_exception(self, e, path, more_info='',
686
687
                                failure_exc=PathError):
687
688
        """Translate a paramiko or IOError into a friendlier exception.
688
689