Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/adam/model/std_factories/std_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_xml_string(path: str | pathlib.Path):

# Checking if it is a path or an urdf
if not isPath:
if len(path) <= MAX_PATH and os.path.exists(path):
if len(path) <= MAX_PATH and "<robot" not in path:
path = pathlib.Path(path)
isPath = True
else:
Expand All @@ -49,11 +49,7 @@ def get_xml_string(path: str | pathlib.Path):
break

if isPath:
if not path.is_file():
raise FileExistsError(path)

with path.open() as xml_file:
xml_string = xml_file.read()
xml_string = path.read_text()

if not isPath and not isUrdf:
raise ValueError(
Expand Down