Skip to content

Commit

Permalink
parsers: Expect empty ETag in objects list (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
vadmeste authored and harshavardhana committed Jan 26, 2017
1 parent 0e75ae7 commit deb4189
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minio/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ def get_urldecoded_elem_text(self, name, strict=True):
# strictness is already enforced above.
return urldecode(text) if text is not None else None

def get_etag_elem(self):
def get_etag_elem(self, strict=True):
"""Fetches an 'ETag' child element suitably processed.
"""
return self.get_child_text('ETag').replace('"', '')
return self.get_child_text('ETag', strict).replace('"', '')

def get_int_elem(self, name):
"""Fetches an integer type XML child element by name.
Expand Down Expand Up @@ -199,7 +199,7 @@ def _parse_objects_from_xml_elts(bucket_name, contents, common_prefixes):
Object(bucket_name,
content.get_urldecoded_elem_text('Key'),
content.get_localized_time_elem('LastModified'),
content.get_etag_elem(),
content.get_etag_elem(strict=False),
content.get_int_elem('Size'))
for content in contents
]
Expand Down

0 comments on commit deb4189

Please sign in to comment.