jon slavin points out that using the 'cmp' keyword is not compatible
with python 2.3.
This commit is contained in:
Robey Pointer 2007-08-31 20:13:48 -07:00
parent 39b45b4000
commit 2cf5448d43
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class SFTPFile (BufferedFile):
k = [i for i in self._prefetch_reads if i[0] <= offset] k = [i for i in self._prefetch_reads if i[0] <= offset]
if len(k) == 0: if len(k) == 0:
return False return False
k.sort(cmp=lambda x, y: cmp(x[0], y[0])) k.sort(lambda x, y: cmp(x[0], y[0]))
buf_offset, buf_size = k[-1] buf_offset, buf_size = k[-1]
if buf_offset + buf_size <= offset: if buf_offset + buf_size <= offset:
# prefetch request ends before this one begins # prefetch request ends before this one begins