~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp.py

  • Committer: Matthieu Moy
  • Date: 2006-01-31 09:28:14 UTC
  • mto: (1185.50.62 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: Matthieu.Moy@imag.fr-20060131092814-3b09f3122a0e0308
Raise NoSuchFile in stat when this is the case

Show diffs side-by-side

added added

removed removed

Lines of Context:
358
358
            f = self._get_FTP()
359
359
            return FtpStatResult(f, self._abspath(relpath))
360
360
        except ftplib.error_perm, e:
361
 
            raise TransportError(orig_error=e)
 
361
            if "no such file" in str(e).lower():
 
362
                raise NoSuchFile("Error storing %s: %s"
 
363
                                 % (self.abspath(relpath), str(e)), extra=e)
 
364
            else:
 
365
                raise FtpTransportError(orig_error=e)
362
366
 
363
367
    def lock_read(self, relpath):
364
368
        """Lock the given file for shared (read) access.