Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise error if a non-existing string-type path is passed #103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

flferretti
Copy link
Contributor

@flferretti flferretti commented Nov 4, 2024

This pull request includes a small change to the get_xml_string function in the src/adam/model/std_factories/std_model.py file. The change simplifies the condition for converting a string to a pathlib.Path object by removing the redundant check for the existence of the path. In this way, an error will be raised when a non-existing string-type path is passed

@xela-95
Copy link
Member

xela-95 commented Nov 6, 2024

@flferretti what happens if we are in the following case: we have an input path variable that is a string and it is a urdf, but without being longer than MAX_PATH? is this an edge case we can forget about?

@flferretti
Copy link
Contributor Author

is this an edge case we can forget about?

Yes, but we could also think about something like if "<robot" in path:"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants