Skip to content

Commit cfc7430

Browse files
committed
Fixed bug in get_listable_tags where the tags weren't getting parsed into a list.
1 parent 4c46382 commit cfc7430

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

EsuRestApi.py

+8-14
Original file line numberDiff line numberDiff line change
@@ -674,11 +674,9 @@ def create_directory(self, path):
674674
raise EsuException(e.code, atmos_error)
675675

676676
else: # If there was no HTTPError, parse the location header in the response body to get the object_id
677-
678-
if not SIMULATE:
679-
object_id = self.__parse_location(response)
680-
return object_id
681-
677+
object_id = self.__parse_location(response)
678+
return object_id
679+
682680
# Renames won't work before Atmos 1.3.x
683681
def rename_object(self, source, destination, force):
684682
""" Renames an object in the namespace interface.
@@ -717,8 +715,7 @@ def rename_object(self, source, destination, force):
717715
raise EsuException(e.code, atmos_error)
718716

719717
else:
720-
if not SIMULATE:
721-
return response
718+
return response
722719

723720
def set_user_metadata(self, object_id, listable_meta = None, non_listable_meta = None):
724721
""" Updates an existing object with listable and/or non-listable user metadata
@@ -888,8 +885,7 @@ def delete_user_metadata(self, object_id, metadata_key):
888885
raise EsuException(e.code, atmos_error)
889886

890887
else:
891-
if not SIMULATE:
892-
return response
888+
return response
893889

894890

895891
def get_user_metadata(self, object_id):
@@ -1036,11 +1032,9 @@ def get_listable_tags(self, metadata_key = None):
10361032
raise EsuException(e.code, atmos_error)
10371033

10381034
else:
1039-
1040-
if not SIMULATE:
1041-
listable_tags = []
1042-
listable_tags = response.info().getheader('x-emc-listable-tags')
1043-
return listable_tags
1035+
response = response.info().getheader('x-emc-listable-tags')
1036+
listable_tags = response.split(', ')
1037+
return listable_tags
10441038

10451039
def get_object_info(self, object_id):
10461040
""" Returns replica information for a given object. Only works with Atmos 1.4 and later.

0 commit comments

Comments
 (0)