Skip to content

Commit

Permalink
Changed getiter to iter (#1) (#241)
Browse files Browse the repository at this point in the history
replaced the function call getiter with the proposed replacement iter according to the [Python docs ](https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.ElementTree.getiterator)
  • Loading branch information
sven-herrmann authored Mar 19, 2021
1 parent 19c2599 commit aaf8da5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rqt_gui/src/rqt_gui/ros_plugin_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ def _parse_plugin_xml(self, package_name, plugin_xml):
qCritical('RosPluginProvider._parse_plugin_xml() could not parse "%s" in package "%s"'
% (plugin_xml, package_name))
return plugin_descriptors
for library_el in root.getiterator('library'):
for library_el in root.iter('library'):
library_path = library_el.attrib['path']

for class_el in library_el.getiterator('class'):
for class_el in library_el.iter('class'):
# collect common attributes
attributes = {
'package_name': package_name,
Expand Down Expand Up @@ -193,7 +193,7 @@ def _parse_plugin(self, class_el):
guiplugin_el = class_el.find('qtgui')
if guiplugin_el is not None:
plugin_attributes.update(self._parse_action_group(guiplugin_el))
for group_el in guiplugin_el.getiterator('group'):
for group_el in guiplugin_el.iter('group'):
groups.append(self._parse_action_group(group_el))

return plugin_attributes, groups
Expand Down

0 comments on commit aaf8da5

Please sign in to comment.