From 643b3d005a8865c961b836aeae4c1f76711646e9 Mon Sep 17 00:00:00 2001
From: Conrad Kostecki <conrad@kostecki.com>
Date: Mon, 24 Aug 2020 23:58:10 +0200
Subject: [PATCH] Add python3.9 compatiblity

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>
---
 mugshot_lib/Builder.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mugshot_lib/Builder.py b/mugshot_lib/Builder.py
index 7297541..6c08d70 100644
--- a/mugshot_lib/Builder.py
+++ b/mugshot_lib/Builder.py
@@ -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)
@@ -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})
