[gimp-help/wip/wormnest/python3-migration: 6/14] tools: also update docbook.py to python3.
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help/wip/wormnest/python3-migration: 6/14] tools: also update docbook.py to python3.
- Date: Thu, 3 Jun 2021 02:38:48 +0000 (UTC)
commit b011211ec0d2543aefc78199c9f1fd946a256bb0
Author: Jacob Boerema <jgboerema gmail com>
Date: Mon Mar 29 17:55:35 2021 -0400
tools: also update docbook.py to python3.
tools/xml2po/modes/docbook.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tools/xml2po/modes/docbook.py b/tools/xml2po/modes/docbook.py
index 5658ffc1a..ed395080e 100644
--- a/tools/xml2po/modes/docbook.py
+++ b/tools/xml2po/modes/docbook.py
@@ -95,7 +95,7 @@ class docbookXmlMode(basicXmlMode):
ret = self._find_articleinfo(child)
if ret:
return ret
- child = child.__next__
+ child = child.next
return None
def _find_lastcopyright(self, node):
@@ -140,7 +140,7 @@ class docbookXmlMode(basicXmlMode):
child = node.children
while child:
self._output_images(child,msg)
- child = child.__next__
+ child = child.next
def preProcessXml(self, doc, msg):
@@ -157,7 +157,7 @@ class docbookXmlMode(basicXmlMode):
root = doc.getRootElement()
# DocBook documents can be something other than article, handle that as well in the future
while root and root.name != 'article' and root.name != 'book':
- root = root.__next__
+ root = root.next
if root and (root.name == 'article' or root.name == 'book'):
root.setProp('lang', language)
else:
@@ -184,7 +184,7 @@ class docbookXmlMode(basicXmlMode):
else:
ai.addChild(copy)
if match.group(3):
- copy.newChild(None, "year", match.group(3).encode('utf-8'))
+ copy.newChild(None, "year", match.group(3))
if match.group(1) and match.group(2):
holder = match.group(1)+"(%s)" % match.group(2)
elif match.group(1):
@@ -193,7 +193,7 @@ class docbookXmlMode(basicXmlMode):
holder = match.group(2)
else:
holder = "???"
- copy.newChild(None, "holder", holder.encode('utf-8'))
+ copy.newChild(None, "holder", holder)
# Perform some tests when ran standalone
if __name__ == '__main__':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]