upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / transmageddon / trunk / 0001-Remove-the-usage-of-deprecated-xml.etree.ElementTree.patch
blobe43786fd06428e25cac226a9d79831b229d71701
1 From 3f7dd82b90b29bb1ad701d82377a462d6fd80d16 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
3 Date: Thu, 13 May 2021 21:53:45 +0200
4 Subject: [PATCH] Remove the usage of deprecated
5 'xml.etree.ElementTree.Element.getchildren'
7 This fix is needed for Python 3.9.
8 ---
9 src/presets.py | 14 +++++++-------
10 1 file changed, 7 insertions(+), 7 deletions(-)
12 diff --git a/src/presets.py b/src/presets.py
13 index 2cc8cf5..40a6f48 100644
14 --- a/src/presets.py
15 +++ b/src/presets.py
16 @@ -271,7 +271,7 @@ def _load_author(root):
17 """
18 author = Author()
20 - for child in root.getchildren():
21 + for child in list(root):
22 if child.tag == "name":
23 author.name = child.text.strip()
24 elif child.tag == "email":
25 @@ -290,7 +290,7 @@ def _load_audio_codec(root):
26 """
27 codec = AudioCodec()
29 - for child in root.getchildren():
30 + for child in list(root):
31 if child.tag == "name":
32 codec.name = child.text.strip()
33 elif child.tag == "container":
34 @@ -304,7 +304,7 @@ def _load_audio_codec(root):
35 elif child.tag == "samplerate":
36 codec.samplerate = child.text.strip()
37 elif child.tag == "presets":
38 - for command in child.getchildren():
39 + for command in list(child):
40 codec.presets.append(command.text.strip())
42 return codec
43 @@ -320,7 +320,7 @@ def _load_video_codec(root):
44 """
45 codec = VideoCodec()
47 - for child in root.getchildren():
48 + for child in list(root):
49 if child.tag == "name":
50 codec.name = child.text.strip()
51 elif child.tag == "container":
52 @@ -340,7 +340,7 @@ def _load_video_codec(root):
53 elif child.tag == "passes":
54 codec.passes = child.text.strip()
55 elif child.tag == "presets":
56 - for command in child.getchildren():
57 + for command in list(child):
58 codec.presets.append(command.text.strip())
60 return codec
61 @@ -356,7 +356,7 @@ def _load_preset(root):
62 """
63 preset = Preset()
65 - for child in root.getchildren():
66 + for child in list(root):
67 if child.tag == "name":
68 preset.name = child.text.strip()
69 elif child.tag == "container":
70 @@ -391,7 +391,7 @@ def load(filename):
72 device.filename = filename
74 - for child in tree.getroot().getchildren():
75 + for child in list(tree.getroot()):
76 if child.tag == "make":
77 device.make = child.text.strip()
78 elif child.tag == "model":
79 --
80 2.31.1