]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
generate_objects: use rewind=True in upload_objects 5/head
authorMatthew Wodrich <matthew.wodrich@dreamhost.com>
Thu, 28 Feb 2013 04:02:25 +0000 (20:02 -0800)
committerMatthew Wodrich <matthew.wodrich@dreamhost.com>
Fri, 1 Mar 2013 23:45:28 +0000 (15:45 -0800)
Use the rewind=True argument when uploading objects to make
realistic.py's use of upload_objects compatible with boto>=2.4.1, which
will try to seek to the end of the fp if rewind is not True.

s3tests/generate_objects.py

index 0f1ded78f6afc1ed7ae487e63acf498e42db5a15..420235a0ae071e297c4d87abc004f77a2a03d57a 100644 (file)
@@ -46,7 +46,7 @@ def upload_objects(bucket, files, seed):
         print >> sys.stderr, 'sending file with size %dB' % fp.size
         key = Key(bucket)
         key.key = name_generator.next()
-        key.set_contents_from_file(fp)
+        key.set_contents_from_file(fp, rewind=True)
         key.set_acl('public-read')
         keys.append(key)