Raising MalformedXML exception when using boto3 client and s3.delete_objects()

This commit is contained in:
Mariusz Strzelecki 2019-06-18 12:36:32 +00:00
commit f32db6e64a
2 changed files with 14 additions and 0 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