Merge pull request #2250 from szczeles/s3_delete_objects_boto3

Raising MalformedXML exception when using boto3 client and s3.delete_objects()
This commit is contained in:
Steve Pulec 2019-07-23 22:41:45 -05:00 committed by GitHub
commit 5abe56fd2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -566,6 +566,8 @@ class ResponseObject(_TemplateEnvironmentMixin):
keys = minidom.parseString(body).getElementsByTagName('Key')
deleted_names = []
error_names = []
if len(keys) == 0:
raise MalformedXML()
for k in keys:
key_name = k.firstChild.nodeValue