From 2b28737d604045f9fd5f8940588fe49305a7ea8d Mon Sep 17 00:00:00 2001 From: Matthew Wodrich Date: Wed, 27 Feb 2013 20:02:25 -0800 Subject: [PATCH] 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. --- s3tests/generate_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3tests/generate_objects.py b/s3tests/generate_objects.py index 0f1ded7..420235a 100644 --- a/s3tests/generate_objects.py +++ b/s3tests/generate_objects.py @@ -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)