

def get_object(self, filename, start=0, end=None):
    "Get file content with a GET.\n\n    Args:\n      filename: gs filename of form '/bucket/filename'.\n      start: start offset to request. Inclusive.\n      end: end offset to request. Inclusive.\n\n    Returns:\n      The segment of file content requested.\n\n    Raises:\n      ValueError: if file doesn't exist.\n    "
    common.validate_file_path(filename)
    blobkey = self._filename_to_blobkey(filename)
    gsfileinfo = _AE_GCSFileInfo_.get_by_key_name(blobkey)
    if ((not gsfileinfo) or (not gsfileinfo.finalized)):
        raise ValueError('File does not exist.')
    local_file = self.blob_storage.OpenBlob(blobkey)
    local_file.seek(start)
    if end:
        return local_file.read(((end - start) + 1))
    else:
        return local_file.read()

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/cloudstorage/cloudstorage_stub.py CloudStorageStub.get_object/original