~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp.py

  • Committer: John Arbash Meinel
  • Date: 2007-07-11 23:45:20 UTC
  • mfrom: (2601 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2643.
  • Revision ID: john@arbash-meinel.com-20070711234520-do3h7zw8skbathpz
[merge] bzr.dev 2601

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
            or 'could not open' in s
167
167
            or 'no such dir' in s
168
168
            or 'could not create file' in s # vsftpd
 
169
            or 'file doesn\'t exist' in s
169
170
            ):
170
171
            raise errors.NoSuchFile(path, extra=extra)
171
172
        if ('file exists' in s):
329
330
                    raise e
330
331
                raise
331
332
        except ftplib.error_perm, e:
332
 
            self._translate_perm_error(e, abspath, extra='could not store')
 
333
            self._translate_perm_error(e, abspath, extra='could not store',
 
334
                                       unknown_exc=errors.NoSuchFile)
333
335
        except ftplib.error_temp, e:
334
336
            if retries > _number_of_retries:
335
337
                raise errors.TransportError("FTP temporary error during PUT %s. Aborting."
487
489
            self._translate_perm_error(e, abspath, 'error deleting',
488
490
                unknown_exc=errors.NoSuchFile)
489
491
 
 
492
    def external_url(self):
 
493
        """See bzrlib.transport.Transport.external_url."""
 
494
        # FTP URL's are externally usable.
 
495
        return self.base
 
496
 
490
497
    def listable(self):
491
498
        """See Transport.listable."""
492
499
        return True
557
564
 
558
565
 
559
566
class FtpServer(Server):
560
 
    """Common code for SFTP server facilities."""
 
567
    """Common code for FTP server facilities."""
561
568
 
562
569
    def __init__(self):
563
570
        self._root = None