def read(self, size=None):
        ret = self.fp.read(size)
        self.amount_read += len(ret)
        if self.amount_read > self.max_file_size:
            self.file_size_exceeded = True
            raise EOFError('max_file_size exceeded')
        return ret
dataset/ETHPy150Open openstack/swift/swift/common/middleware/formpost.py/_CappedFileLikeObject.read/original