def put(self, nodeId):
        '''
        | Put a new value for the maxAttempt attribute of a task node
        | The new maxAttempt value is taken from request body, for instance : "{ maxAttempt : 10 }"

        :param nodeId: id of the task node to update
        '''

        # Get task object
        try:
            nodeId = int(nodeId)
            node = self._findNode(nodeId)
        except NodeNotFoundError:
            raise HTTPError(404, "Node not found: %d" % nodeId)

        # Get maxAttemtp from request body
        data = self.getBodyAsJSON()
        try:
            maxAttempt = int(data['maxAttempt'])
        except __HOLE__, e:
            raise HTTPError(400, 'Missing entry: "maxAttempt".')
        except (TypeError, ValueError), e:
            raise HTTPError(400, 'Invalid type for "maxAttempt", integer expected but %r received (error: %s)' % (data['maxAttempt'], e))

        # Update selected node and associated task
        if isinstance(node, TaskNode) or isinstance(node, FolderNode):
            result = node.setMaxAttempt(maxAttempt)
            if result is False:
                raise HTTPError(404, "Impossible to set 'maxAttempt' on node %d" % nodeId)
        else:
            raise HTTPError(404, "Invalid element selected: %r" % type(node))

        message = "Attribute maxAttempt of node %d has successfully been updated." % nodeId
        self.writeCallback(message)
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/octopus/dispatcher/webservice/nodes.py/NodeMaxAttemptResource.put