~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp/__init__.py

  • Committer: Andrew Bennetts
  • Date: 2010-08-17 06:45:33 UTC
  • mfrom: (5050.17.9 2.2)
  • mto: This revision was merged to the branch mainline in revision 5379.
  • Revision ID: andrew.bennetts@canonical.com-20100817064533-kof2i2f3r6mr4ayb
Merge lp:bzr/2.2 into lp:bzr, including fixes for #192859, #224373, #300062, #585667, #614404, #617503.

Show diffs side-by-side

added added

removed removed

Lines of Context:
350
350
        try:
351
351
            mutter("FTP mkd: %s", abspath)
352
352
            f = self._get_FTP()
353
 
            f.mkd(abspath)
 
353
            try:
 
354
                f.mkd(abspath)
 
355
            except ftplib.error_reply, e:
 
356
                # <https://bugs.launchpad.net/bzr/+bug/224373> Microsoft FTP
 
357
                # server returns "250 Directory created." which is kind of
 
358
                # reasonable, 250 meaning "requested file action OK", but not what
 
359
                # Python's ftplib expects.
 
360
                if e[0][:3] == '250':
 
361
                    pass
 
362
                else:
 
363
                    raise
354
364
            self._setmode(relpath, mode)
355
365
        except ftplib.error_perm, e:
356
366
            self._translate_ftp_error(e, abspath,