~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Aaron Bentley
  • Date: 2007-08-20 13:07:12 UTC
  • mfrom: (2732 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2733.
  • Revision ID: abentley@panoramicfeedback.com-20070820130712-buopmg528zcgwyxc
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
import time
35
35
import urllib
36
36
import urlparse
 
37
import warnings
37
38
 
38
39
from bzrlib import (
39
40
    errors,
60
61
    ConnectedTransport,
61
62
    )
62
63
 
 
64
# Disable one particular warning that comes from paramiko in Python2.5; if
 
65
# this is emitted at the wrong time it tends to cause spurious test failures
 
66
# or at least noise in the test case::
 
67
#
 
68
# [1770/7639 in 86s, 1 known failures, 50 skipped, 2 missing features]
 
69
# test_permissions.TestSftpPermissions.test_new_files
 
70
# /var/lib/python-support/python2.5/paramiko/message.py:226: DeprecationWarning: integer argument expected, got float
 
71
#  self.packet.write(struct.pack('>I', n))
 
72
warnings.filterwarnings('ignore',
 
73
        'integer argument expected, got float',
 
74
        category=DeprecationWarning,
 
75
        module='paramiko.message')
 
76
 
63
77
try:
64
78
    import paramiko
65
79
except ImportError, e:
205
219
            self._set_connection(connection, credentials)
206
220
        return connection
207
221
 
208
 
 
209
 
    def should_cache(self):
210
 
        """
211
 
        Return True if the data pulled across should be cached locally.
212
 
        """
213
 
        return True
214
 
 
215
222
    def has(self, relpath):
216
223
        """
217
224
        Does the target location exist?