diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-02-10 18:21:47 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-02-11 08:06:14 -0800 |
commit | 675e30986e3aa2882093b8c983a93619f61a019d (patch) | |
tree | 28681c8002765c30b220509707e60a5af4139546 | |
parent | 1d87a0ceb9b6689e3969cc2b528f842b51e68f88 (diff) |
Clean up a list-comp (also fixes race condition)
-rw-r--r-- | paramiko/sftp_file.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index c426d6ea..a39b1f47 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -94,7 +94,7 @@ class SFTPFile (BufferedFile): pass def _data_in_prefetch_requests(self, offset, size): - k = [self._prefetch_extents[i] for i in self._prefetch_extents if self._prefetch_extents[i][0] <= offset] + k = [x for x in self._prefetch_extents.values() if x[0] <= offset] if len(k) == 0: return False k.sort(lambda x, y: cmp(x[0], y[0])) |