~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2010-08-31 08:25:15 UTC
  • mfrom: (5247.7.1 catch-them-all)
  • mto: This revision was merged to the branch mainline in revision 5400.
  • Revision ID: v.ladeuil+lp@free.fr-20100831082515-an9mtdmhalo7xaq0
Merge catch-them-all into more-ignored-exceptions

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    osutils,
41
41
    urlutils,
42
42
    )
 
43
from bzrlib.symbol_versioning import (
 
44
    DEPRECATED_PARAMETER,
 
45
    deprecated_in,
 
46
    deprecated_passed,
 
47
    warn,
 
48
    )
43
49
from bzrlib.trace import mutter, warning
44
50
from bzrlib.transport import (
45
51
    AppendBasedFileStream,
240
246
            mutter("FTP has not: %s: %s", abspath, e)
241
247
            return False
242
248
 
243
 
    def get(self, relpath, decode=False, retries=0):
 
249
    def get(self, relpath, decode=DEPRECATED_PARAMETER, retries=0):
244
250
        """Get the file at the given relative path.
245
251
 
246
252
        :param relpath: The relative path to the file
250
256
        We're meant to return a file-like object which bzr will
251
257
        then read from. For now we do this via the magic of StringIO
252
258
        """
253
 
        # TODO: decode should be deprecated
 
259
        if deprecated_passed(decode):
 
260
            warn(deprecated_in((2,3,0)) %
 
261
                 '"decode" parameter to FtpTransport.get()',
 
262
                 DeprecationWarning, stacklevel=2)
254
263
        try:
255
264
            mutter("FTP get: %s", self._remote_path(relpath))
256
265
            f = self._get_FTP()