Revision 2bcb595a kamaki/clients/storage.py

b/kamaki/clients/storage.py
84 84
    def get_object(self, object):
85 85
        self.assert_container()
86 86
        path = '/%s/%s/%s' % (self.account, self.container, object)
87
        r = self.get(path, raw=True)
87
        r = self.get(path, raw=True, success=200)
88 88
        size = int(r.headers['content-length'])
89 89
        return r.raw, size
90 90
    
......
92 92
        self.assert_container()
93 93
        path = '/%s/%s/%s' % (self.account, self.container, object)
94 94
        self.delete(path, success=204)
95
    
96
    def list_objects(self, path=''):
97
        self.assert_container()
98
        path = '/%s/%s' % (self.account, self.container)
99
        params = dict(format='json')
100
        r = self.get(path, params=params, success=(200, 204))
101
        return r.json

Also available in: Unified diff