Răsfoiți Sursa

HUE-4403 [aws] Close file after read using fast=True

This avoids reading the whole file: http://boto.cloudhackers.com/en/latest/ref/s3.html#boto.s3.key.Key.close
Jenny Kim 9 ani în urmă
părinte
comite
cd6f67b
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      desktop/core/ext-py/boto-2.38.0/boto/s3/keyfile.py

+ 1 - 1
desktop/core/ext-py/boto-2.38.0/boto/s3/keyfile.py

@@ -89,7 +89,7 @@ class KeyFile():
     return self.key.read(size)
 
   def close(self):
-    self.key.close()
+    self.key.close(fast=True)
     self.location = None
     self.closed = True