'Retrieve an object
:param name: The object name
:param range: A string range like "0-10" to
retrieve specified bytes in object content
:return: A file like instance
or bytestring if range is specified'

def get_object(self, name, range=None):

    headers = {}
    if range:
        headers['Range'] = ('bytes=%s' % range)
    path = ((self.base_path + '/') + name)
    ret = self.httpclient.request('GET', path, headers=headers)
    if (ret.status_code == 404):
        return None
    if ((ret.status_code < 200) or (ret.status_code > 300)):
        raise SwiftException(('GET    request    failed    with    error    code    %s' % ret.status_code))
    content = ret.read()
    if range:
        return content
    return BytesIO(content)
