~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: 2009-06-06 00:52:40 UTC
  • mfrom: (4105.2.3 340352-rename-lock)
  • Revision ID: pqm@pqm.ubuntu.com-20090606005240-2qms4n1eqdshzp0w
(mbp) better handling of 'directory not empty' over sftp

Show diffs side-by-side

added added

removed removed

Lines of Context:
711
711
            # strange but true, for the paramiko server.
712
712
            if (e.args == ('Failure',)):
713
713
                raise failure_exc(path, str(e) + more_info)
 
714
            # Can be something like args = ('Directory not empty:
 
715
            # '/srv/bazaar.launchpad.net/blah...: '
 
716
            # [Errno 39] Directory not empty',)
 
717
            if (e.args[0].startswith('Directory not empty: ')
 
718
                or getattr(e, 'errno', None) == errno.ENOTEMPTY):
 
719
                raise errors.DirectoryNotEmpty(path, str(e))
714
720
            mutter('Raising exception with args %s', e.args)
715
721
        if getattr(e, 'errno', None) is not None:
716
722
            mutter('Raising exception with errno %s', e.errno)