~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp.py

  • Committer: Vincent Ladeuil
  • Date: 2007-06-01 08:02:26 UTC
  • mto: (2485.8.44 bzr.connection.sharing)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070601080226-5styxtzexznctvg0
Assert the accepted schemes for sftp and ftp.

* bzrlib/transport/sftp.py:
(SFTPTransport.__init__): assert the accepted scheme.

* bzrlib/transport/ftp.py:
(FtpTransport.__init__): assert the accepted schemes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
 
82
82
    def __init__(self, base, _provided_instance=None):
83
83
        """Set the base path where files will be stored."""
 
84
        assert base.startswith('ftp://') or base.startswith('aftp://')
84
85
        super(FtpTransport, self).__init__(base)
85
86
        if self._scheme == 'aftp':
86
87
            self._unqualified_scheme = 'ftp'