Skip to content

Task creation should fail if spawner doesn't have property #109

@phil-brad

Description

@phil-brad

If you have unknown properties in the spawner, these simply get added as an attribute of the spawner object (unless the spawner overloads __setattr__). Following code from generate_tasks_from_spec:

    if node.has_property:
        value = _check_type(task_spawner, node.property_name, node.property_value)
        if isinstance(node, IndexedNode):
            array = getattr(task_spawner, node.property_name)
            array[node.index] = value
        else:
            setattr(task_spawner, node.property_name, value)

In the else statement, perhaps a hasattr check should be done first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions