mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-22 09:29:43 +00:00
generate_objects: use rewind=True in upload_objects
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.
This commit is contained in:
parent
b39f25a02b
commit
94cc7025fa
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ def upload_objects(bucket, files, seed):
|
||||||
print >> sys.stderr, 'sending file with size %dB' % fp.size
|
print >> sys.stderr, 'sending file with size %dB' % fp.size
|
||||||
key = Key(bucket)
|
key = Key(bucket)
|
||||||
key.key = name_generator.next()
|
key.key = name_generator.next()
|
||||||
key.set_contents_from_file(fp)
|
key.set_contents_from_file(fp, rewind=True)
|
||||||
key.set_acl('public-read')
|
key.set_acl('public-read')
|
||||||
keys.append(key)
|
keys.append(key)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue