Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: bin/
Date: Wed, 25 Dec 2019 04:36:27
Message-Id: 1577248559.412fa6cd47e75ef45b7d472d6c4fbea9dcea5550.gokturk@gentoo
1 commit: 412fa6cd47e75ef45b7d472d6c4fbea9dcea5550
2 Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 25 04:33:55 2019 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 25 04:35:59 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=412fa6cd
7
8 bin/build_search_documents.py: do not use the deprecated .getchildren()
9
10 ```
11 Deprecated since version 3.2, will be removed in version 3.9: Use
12 list(elem) or iteration.
13 ```
14
15 Suggested-by: Michał Górny <mgorny <AT> gentoo.org>
16 Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
17
18 bin/build_search_documents.py | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
22 index e19dce6..37b6af9 100755
23 --- a/bin/build_search_documents.py
24 +++ b/bin/build_search_documents.py
25 @@ -30,7 +30,7 @@ def stringify_node(parent: ET.Element) -> str:
26 # along with the tail text following it.
27 # The tail may include '\n' if it spans multiple lines.
28 # We will worry about those on return, not now.
29 - for child in parent.getchildren():
30 + for child in parent:
31 # The '<d/>' tag is simply a fancier '-' character
32 if child.tag == 'd':
33 text += '-'