Skip to content

Call to xacro.process_file in utils.py load_xacro can/will throw #16

@acalhoon

Description

@acalhoon

The latest merge to xacro -- here adds a call to re.sub which attempts to sanitize the input file path render inside an XML file. Unfortunately, because load_xacro provides a pathlib.Path the re.sub call crashes.

I think this could be fixed by changing the call to

    file = xacro.process_file(str(file_path), mappings=mappings)

Unclear to me whether this explicit conversion to string should happen in this module or in xacro. I'm curious to get the maintainers`s opinions.

Happy to submit a pull request if this is the direction you all think this should go.

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