kopia lustrzana https://github.com/simonw/s3-credentials
Fix for whitespace in keys, refs #83
rodzic
20b4545ad1
commit
3c05be4375
|
@ -1387,6 +1387,8 @@ def delete_objects(bucket, keys, prefix, silent, dry_run, **boto_options):
|
||||||
click.echo(key)
|
click.echo(key)
|
||||||
return
|
return
|
||||||
for batch in batches(keys, 1000):
|
for batch in batches(keys, 1000):
|
||||||
|
# Remove any rogue \r characters:
|
||||||
|
batch = [k.strip() for k in batch]
|
||||||
response = s3.delete_objects(
|
response = s3.delete_objects(
|
||||||
Bucket=bucket, Delete={"Objects": [{"Key": key} for key in batch]}
|
Bucket=bucket, Delete={"Objects": [{"Key": key} for key in batch]}
|
||||||
)
|
)
|
||||||
|
|
Ładowanie…
Reference in New Issue