def put(self, nodeId):

        # 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 KeyError, 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)
| Put a new value for the maxAttempt attribute of a task node
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/octopus/dispatcher/webservice/nodes.py/NodeMaxAttemptResource.put