Skip to content

Commit 3fdb2af

Browse files
DeepMindalimuldal
authored andcommitted
Also accept mujoco.* as the main tag in the parser.
PiperOrigin-RevId: 331411703 Change-Id: I3821e325ca0ee76d060db45a4b5d9ff14c7348ce
1 parent 2a93218 commit 3fdb2af

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

dm_control/mjcf/parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ def _parse(xml_root, escape_separators=False,
132132
An `mjcf.RootElement`.
133133
134134
Raises:
135-
ValueError: If `xml_root`'s tag is not 'mujoco'.
135+
ValueError: If `xml_root`'s tag is not 'mujoco.*'.
136136
"""
137137

138138
assets = assets or {}
139139

140-
if xml_root.tag != 'mujoco':
141-
raise ValueError('Root element of the XML should be <mujoco>: got <{}>'
140+
if not xml_root.tag.startswith('mujoco'):
141+
raise ValueError('Root element of the XML should be <mujoco.*>: got <{}>'
142142
.format(xml_root.tag))
143143

144144
with debugging.freeze_current_stack_trace():

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def is_excluded(s):
177177

178178
setup(
179179
name='dm_control',
180-
version='0.0.330388914',
180+
version='0.0.331411703',
181181
description='Continuous control environments and MuJoCo Python bindings.',
182182
author='DeepMind',
183183
license='Apache License, Version 2.0',

0 commit comments

Comments
 (0)