File: python39

package info (click to toggle)
ocrfeeder 0.8.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,548 kB
  • sloc: python: 6,500; sh: 850; makefile: 119; xml: 62
file content (22 lines) | stat: -rw-r--r-- 905 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Deprecated xml.etree.ElementTree.Element.getchildren
 Remove the usage of deprecated 'xml.etree.ElementTree.Element.getchildren'
 .
 It's not available anymore since Python 3.9.
Author: Roman Franchuk <franchukrom@gmail.com>
Origin: upstream
Bug: https://gitlab.gnome.org/GNOME/ocrfeeder/-/issues/28
Bug-Debian: https://bugs.debian.org/977324
Reviewed-By: Jean-Michel Vourgère <nirgal@debian.org>
Last-Update: 2021-02-05

--- ocrfeeder-0.8.3.orig/src/ocrfeeder/feeder/ocrEngines.py
+++ ocrfeeder-0.8.3/src/ocrfeeder/feeder/ocrEngines.py
@@ -233,7 +233,7 @@ class OcrEnginesManager:
         document = ET.parse(xml_file_name)
         root_node = document.getroot()
         arguments = {}
-        for child in root_node.getchildren():
+        for child in list(root_node):
             arg_name = child.tag
             arg_value = child.text
             arguments[arg_name] = arg_value