def getKeyValue(self, bucketName, keyName, logBytes = True):
        """return the value of a key. raises KeyNotFound if it doesn't exist."""
        with self.state_.lock:
            if bucketName not in self.state_.buckets_:
                raise S3Interface.BucketNotFound(bucketName)

            self.state_.validateAccess(bucketName, self.credentials_)

            if keyName not in self.state_.buckets_[bucketName]:
                raise S3Interface.KeyNotFound(bucketName, keyName)

            result = self.state_.buckets_[bucketName][keyName].value

        if logBytes:
            self.state_.logBytesLoadedAndDelay(self.machine_, len(result))

        return result
dataset/ETHPy150Open ufora/ufora/ufora/distributed/S3/InMemoryS3Interface.py/InMemoryS3Interface.getKeyValue/original