Skip to content

Commit

Permalink
Revert "list_objecst: fix parsing user metadata as per MinIO server (#…
Browse files Browse the repository at this point in the history
…1240)" (#1273)

This reverts commit f764d45.
  • Loading branch information
balamurugana authored Apr 6, 2023
1 parent 97db7d2 commit 4452ce7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions minio/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,11 @@ def fromxml(cls, element, bucket_name, is_delete_marker=False,
else (findtext(tag, "ID"), findtext(tag, "DisplayName"))
)

tag = find(element, "UserMetadata") or []
metadata = {}
selement = find(element, "UserMetadata")
if selement:
for child in findall(selement, "Items"):
key = findtext(child, "Key", True)
value = findtext(child, "Value", True)
metadata[key] = value
for child in tag:
key = child.tag.split("}")[1] if "}" in child.tag else child.tag
metadata[key] = child.text

object_name = findtext(element, "Key", True)
if encoding_type == "url":
Expand Down

0 comments on commit 4452ce7

Please sign in to comment.