]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
Avoid built-in "file" as variable name.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 26 Jul 2011 16:35:17 +0000 (09:35 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 26 Jul 2011 21:20:28 +0000 (14:20 -0700)
s3tests/rand_readwrite.py

index 16d7a91d839738863a6d763fb82b37aac0dacd46..398fc0e19e641c2499c73ea7acff0594c26e947a 100644 (file)
@@ -116,13 +116,13 @@ def parse_options():
 
     return parser.parse_args()
 
-def write_file(bucket, file_name, file):
+def write_file(bucket, file_name, fp):
     """
     Write a single file to the bucket using the file_name.
     This is used during the warmup to initialize the files.
     """
     key = bucket.new_key(file_name)
-    key.set_contents_from_file(file)
+    key.set_contents_from_file(fp)
 
 def main():
     # parse options
@@ -166,12 +166,12 @@ def main():
         print "Uploading initial set of {num} files".format(num=config.files.num)
         warmup_pool = gevent.pool.Pool(size=100)
         for file_name in file_names:
-            file = next(files)
+            fp = next(files)
             warmup_pool.spawn_link_exception(
                 write_file,
                 bucket=bucket,
                 file_name=file_name,
-                file=file,
+                fp=fp,
                 )
         warmup_pool.join()