Fix on xml2po -o -p option for python 3

epel9
Mamoru TASAKA 3 years ago
parent cf71285b82
commit 33cf3dbd1a

@ -518,3 +518,23 @@ diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/xml2po.py.in gnome-doc-ut
# -*- encoding: utf-8 -*-
# Copyright (c) 2004, 2005, 2006 Danilo Šegan <danilo@gnome.org>.
# Copyright (c) 2009 Claude Paroz <claude@2xlibre.net>.
--- gnome-doc-utils-0.20.10.old/xml2po/xml2po/__init__.py 2021-10-14 16:54:33.332661817 +0900
+++ gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py 2021-10-14 17:06:31.006607987 +0900
@@ -504,7 +504,7 @@
# !!! This is not very nice thing to do, but I don't know if
# raising an exception is any better
return False
- return tmpstr.find('EXTERNAL_GENERAL_PARSED_ENTITY') != -1
+ return tmpstr.find(b'EXTERNAL_GENERAL_PARSED_ENTITY') != -1
def doSerialize(self, node):
"""Serializes a node and its children, emitting PO messages along the way.
@@ -556,7 +556,7 @@
elif output == '-':
self.out = sys.stdout
else:
- self.out = file(output, 'w')
+ self.out = open(output, 'w')
def load_mode(self, modename):
try:

@ -1,6 +1,6 @@
Name: gnome-doc-utils
Version: 0.20.10
Release: 26%{?dist}
Release: 27%{?dist}
Summary: Documentation utilities for GNOME
License: GPLv2+ and LGPLv2+ and GFDL
@ -90,6 +90,9 @@ sed -i -e '/^Requires:/d' %{buildroot}%{_datadir}/pkgconfig/xml2po.pc
%{_datadir}/xml/mallard
%changelog
* Thu Oct 14 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.20.10-27
- Fix on xml2po -o -p option for python 3
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.10-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

Loading…
Cancel
Save