Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
141
Merge Requests
141
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
b10b662b
Commit
b10b662b
authored
Oct 10, 2022
by
Kazuhiko Shiozaki
Committed by
Arnaud Fontaine
Jul 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: OOo data is binary.
parent
51f4f39e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
product/ERP5OOo/OOoUtils.py
product/ERP5OOo/OOoUtils.py
+4
-3
No files found.
product/ERP5OOo/OOoUtils.py
View file @
b10b662b
...
...
@@ -49,6 +49,7 @@ from lxml import etree
from
lxml.etree
import
Element
,
XMLSyntaxError
from
copy
import
deepcopy
from
warnings
import
warn
from
Products.ERP5Type.Utils
import
bytes2str
from
Products.ERP5Type.Utils
import
deprecated
class
CorruptedOOoFile
(
Exception
):
pass
...
...
@@ -138,7 +139,7 @@ class OOoBuilder(Implicit):
return
li
def
getMimeType
(
self
):
return
self
.
extract
(
'mimetype'
)
return
bytes2str
(
self
.
extract
(
'mimetype'
)
)
def
prepareContentXml
(
self
,
ooo_xml_file_id
):
"""
...
...
@@ -146,7 +147,7 @@ class OOoBuilder(Implicit):
- add tal namespace
- indent the xml
"""
content_xml
=
self
.
extract
(
ooo_xml_file_id
)
content_xml
=
bytes2str
(
self
.
extract
(
ooo_xml_file_id
)
)
content_doc
=
etree
.
XML
(
content_xml
)
root
=
content_doc
.
getroottree
().
getroot
()
#Declare zope namespaces
...
...
@@ -177,7 +178,7 @@ class OOoBuilder(Implicit):
def
updateManifest
(
self
):
""" Add a path to the manifest """
MANIFEST_FILENAME
=
'META-INF/manifest.xml'
meta_infos
=
self
.
extract
(
MANIFEST_FILENAME
)
meta_infos
=
bytes2str
(
self
.
extract
(
MANIFEST_FILENAME
)
)
# prevent some duplicates
for
meta_line
in
meta_infos
.
split
(
'
\
n
'
):
for
new_meta_line
in
self
.
_manifest_additions_list
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment