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
  • Loading branch information
ksuszka committed Mar 11, 2024
1 parent 61101a0 commit 3e2f7ee
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 3e2f7ee

Please sign in to comment.