Commit f25f5c52 authored by Nicolas Delaby's avatar Nicolas Delaby

Do not set up "num" attribute on "block_data" nodes, as is value can generate accidental diff

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30131 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7ef1ee9c
# -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -100,13 +101,11 @@ def Base_asXML(object, root=None): ...@@ -100,13 +101,11 @@ def Base_asXML(object, root=None):
# <data><block>ZERD</block><block>OEJJM</block></data> # <data><block>ZERD</block><block>OEJJM</block></data>
size_block = 60 size_block = 60
if isinstance(value, str): if isinstance(value, str):
iterator_block = 0
for index in xrange(0, len(value), size_block): for index in xrange(0, len(value), size_block):
content = value[index:index + size_block] content = value[index:index + size_block]
data_encoded = standard_b64encode(content) data_encoded = standard_b64encode(content)
block = SubElement(sub_object, 'block_data', num=str(iterator_block)) block = SubElement(sub_object, 'block_data')
block.text = data_encoded block.text = data_encoded
iterator_block += 1
else: else:
raise "XMLExportImport failed, the data is undefined" raise "XMLExportImport failed, the data is undefined"
elif prop_type in ('lines', 'tokens',): elif prop_type in ('lines', 'tokens',):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment