boto/boto — pull request #461 by tpodowd (2012-01-05 09:44:36+00:00)
Title: Various fixes for delete_keys() as follows:

Mitch,

Happy New Year. First day back in the office. I had some time to test the implementation today and found fixed some bugs. Top 4 are bugs. Final 2 make things more usable in my opinion. Tested using a mix of Japanese and ascii names on versioned buckets.

- missing version_id so it was always passing %s.
- unicode issue with Japanese from a resultset.
- must be at least one object to delete to run Amazon delete multiple object api.
- Error results were mistakenly added as Deleted objects in result.
- Added Prefixes and unknown objects as errors (instead of silently dropping)
Check the code/message and change as you would like.
- Len check was breaking for resultsets so added a new
instance variable called skipped to the Result for
each key over 1000. Caller can then optionally just
recall using skipped keys using something like:

rs = bucket.list_versions()
while rs:
res = bucket.delete_keys(rs, quiet=True)
rs = res.skipped