From f25f5c5242d21c7fe1496fce514b13027657b280 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Thu, 29 Oct 2009 16:59:52 +0000 Subject: [PATCH] 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 --- product/ERP5Type/XMLExportImport.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/XMLExportImport.py b/product/ERP5Type/XMLExportImport.py index eb771d5006..9dcf7fc705 100644 --- a/product/ERP5Type/XMLExportImport.py +++ b/product/ERP5Type/XMLExportImport.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. @@ -100,13 +101,11 @@ def Base_asXML(object, root=None): # <data><block>ZERD</block><block>OEJJM</block></data> size_block = 60 if isinstance(value, str): - iterator_block = 0 for index in xrange(0, len(value), size_block): content = value[index:index + size_block] 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 - iterator_block += 1 else: raise "XMLExportImport failed, the data is undefined" elif prop_type in ('lines', 'tokens',): -- 2.30.9