Skip to content

Commit

Permalink
Replace deprecated python 3.8 code and add missing __init__.py files …
Browse files Browse the repository at this point in the history
…for proper python module recognition (#1053)

Co-authored-by: glopezdiest <[email protected]>
  • Loading branch information
ksuszka and glopezdiest committed May 3, 2024
1 parent 7337855 commit 4e780dc
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
File renamed without changes.
Empty file.
2 changes: 1 addition & 1 deletion srunner/tools/route_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def parse_routes_file(route_filename, single_route_id=''):
scenario_config.name = scenario.attrib.get('name')
scenario_config.type = scenario.attrib.get('type')

for elem in scenario.getchildren():
for elem in list(scenario):
if elem.tag == 'trigger_point':
scenario_config.trigger_points.append(convert_elem_to_transform(elem))
elif elem.tag == 'other_actor':
Expand Down
2 changes: 1 addition & 1 deletion srunner/tools/scenario_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def parse_scenario_configuration(scenario_name, additional_config_file_name):
config.name = scenario_config_name
config.type = scenario_config_type

for elem in scenario.getchildren():
for elem in list(scenario):
# Elements with special parsing
if elem.tag == 'ego_vehicle':
config.ego_vehicles.append(ActorConfigurationData.parse_from_node(elem, 'hero'))
Expand Down

0 comments on commit 4e780dc

Please sign in to comment.