[Erp5-report] r35046 nicolas.dumazet - /erp5/trunk/products/ERP5SyncML/Signature.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu May 6 11:06:36 CEST 2010
Author: nicolas.dumazet
Date: Thu May 6 11:06:31 2010
New Revision: 35046
URL: http://svn.erp5.org?rev=35046&view=rev
Log:
maintaining "index" is not needed. -1 does the trick
Modified:
erp5/trunk/products/ERP5SyncML/Signature.py
Modified: erp5/trunk/products/ERP5SyncML/Signature.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Signature.py?rev=35046&r1=35045&r2=35046&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Signature.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/Signature.py [utf8] Thu May 6 11:06:31 2010
@@ -389,20 +389,18 @@
chunk = list()
chunk.append(self.partial_xml.data)
size = chunk[0].count('\n')
- index = 0
current = next = self.partial_xml.next
while size < size_lines:
current = next
size += current.data.count('\n')
chunk.append(current.data)
- index += 1
next = current.next
if size == size_lines:
self.partial_xml = next
elif size > size_lines:
- data_list = chunk[index].split('\n')
- chunk[index] = '\n'.join(data_list[:size_lines])
+ data_list = chunk[-1].split('\n')
+ chunk[-1] = '\n'.join(data_list[:size_lines])
if current is not None:
current.data = '\n'.join(data_list[size_lines:])
self.partial_xml = current
More information about the Erp5-report
mailing list