Skip to content

Commit

Permalink
Add python3.9 compatiblity
Browse files Browse the repository at this point in the history
Starting with python3.9, launching of mugshot will fail,
as getiterator() been deprecated since Python 2.7,
and has been removed in Python 3.9. Using iter() will fix that.

Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
  • Loading branch information
ConiKost committed Aug 24, 2020
1 parent 8944dce commit 643b3d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mugshot_lib/Builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def add_from_file(self, filename):
tree = ElementTree()
tree.parse(filename)

ele_widgets = tree.getiterator("object")
ele_widgets = tree.iter("object")
for ele_widget in ele_widgets:
name = ele_widget.attrib['id']
widget = self.get_object(name)
Expand All @@ -111,7 +111,7 @@ def add_from_file(self, filename):
if connections:
self.connections.extend(connections)

ele_signals = tree.getiterator("signal")
ele_signals = tree.iter("signal")
for ele_signal in ele_signals:
self.glade_handler_dict.update(
{ele_signal.attrib["handler"]: None})
Expand Down

0 comments on commit 643b3d0

Please sign in to comment.