Beispiel #1
0
    def setProperty(self, robj, property_name, value):
        """
        Sets a property on an object to a given value.
        """

        response = self.sendAndReceive(ReflectionRequestFactory.setProperty(robj._ref, property_name, value))

        if response is None:
            raise ReflectionException("expected a response to SET_PROPERTY")
        elif response.reflection_response.status == Message.ReflectionResponse.SUCCESS:
            return response
        else:
            raise ReflectionException(response.reflection_response.errormessage)