diff options
Diffstat (limited to 'app-portage/gentoolkit/files/gentoolkit-0.5.0-python3_9.patch')
-rw-r--r-- | app-portage/gentoolkit/files/gentoolkit-0.5.0-python3_9.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/app-portage/gentoolkit/files/gentoolkit-0.5.0-python3_9.patch b/app-portage/gentoolkit/files/gentoolkit-0.5.0-python3_9.patch new file mode 100644 index 000000000000..6a50db9ca669 --- /dev/null +++ b/app-portage/gentoolkit/files/gentoolkit-0.5.0-python3_9.patch @@ -0,0 +1,43 @@ +# https://github.com/gentoo/gentoolkit/pull/11 +# https://bugs.gentoo.org/747034 +diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py +index 22c249e..c3dba98 100644 +--- a/pym/gentoolkit/metadata.py ++++ b/pym/gentoolkit/metadata.py +@@ -73,8 +73,7 @@ class _Maintainer(object): + self.description = None + self.restrict = node.get('restrict') + self.status = node.get('status') +- maint_attrs = node.getchildren() +- for attr in maint_attrs: ++ for attr in node.iter(): + setattr(self, attr.tag, attr.text) + + def __repr__(self): +@@ -101,7 +100,7 @@ class _Useflag(object): + _desc = '' + if node.text: + _desc = node.text +- for child in node.getchildren(): ++ for child in node.iter(): + _desc += child.text if child.text else '' + _desc += child.tail if child.tail else '' + # This takes care of tabs and newlines left from the file +@@ -213,7 +212,7 @@ class MetaData(object): + if herd in ('no-herd', 'maintainer-wanted', 'maintainer-needed'): + return None + +- for node in self._herdstree.getiterator('herd'): ++ for node in self._herdstree.iter('herd'): + if node.findtext('name') == herd: + return node.findtext('email') + +@@ -283,7 +282,7 @@ class MetaData(object): + return self._useflags + + self._useflags = [] +- for node in self._xml_tree.getiterator('flag'): ++ for node in self._xml_tree.iter('flag'): + self._useflags.append(_Useflag(node)) + + return self._useflags |