Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


StorageObject.list() to use prefix #4

merged 2 commits into from

1 participant

Kevin McDonald
Kevin McDonald

Changed the StorageObject to use the prefix parameter instead of path. Also updated the minor version because this might break compatibility.

Kevin McDonald sudorandom merged commit fc027e5 into from
sudorandom added some commits
Kevin McDonald sudorandom StorageObject.list() to use prefix
Changed the StorageObject to use the prefix parameter instead of path.
Kevin McDonald sudorandom Minor Version Bump 9223c9a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 16, 2012
  1. Kevin McDonald

    StorageObject.list() to use prefix

    sudorandom authored
    Changed the StorageObject to use the prefix parameter instead of path.
  2. Kevin McDonald

    Minor Version Bump

    sudorandom authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 6 deletions.
  1. +1 −1  object_storage/
  2. +6 −5 object_storage/
2  object_storage/
@@ -3,7 +3,7 @@
See COPYING for license information
-__version__ = "0.4.2"
+__version__ = "0.4.3"
USER_AGENT = "sl-object-storage-python: %s" % __version__
11 object_storage/
@@ -153,8 +153,8 @@ def list(self, limit=None, marker=None, base_only=False):
@raises ResponseError
@return: list of StorageObject instances
- params = {'format': 'json',
- 'path':}
+ params = {'format': 'json',
+ 'prefix':}
if base_only:
params['delimiter'] = self.client.delimiter
if limit:
@@ -169,12 +169,13 @@ def _formatter(res):
if 'name' in item:
objects[item['name']] = self.client.storage_object(self.container, item['name'], headers=item)
elif 'subdir' in item:
- item['name'] = item['subdir'].rstrip('/')
+ name = item['subdir'].rstrip('/')
+ item['name'] = name
item['content_type'] = 'application/directory'
objects[item['name']] = self.client.storage_object(self.container, item['name'], headers=item)
return objects.values()
- return self.client.make_request('GET', [self.container], params=params, formatter=_formatter)
+ return self.client.make_request('GET', [self.container], params=params, formatter=_formatter)
def is_dir(self):
""" returns True if content_type is 'text/directory' """
return self.model.content_type == 'text/directory'
Something went wrong with that request. Please try again.