/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Martin Pool
  • Date: 2009-06-10 02:51:23 UTC
  • mfrom: (4423 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4464.
  • Revision ID: mbp@sourcefrog.net-20090610025123-2u0c0ng5jcezjzqh
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Implementation of Transport over SFTP, using paramiko."""
18
18
 
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)