[Erp5-report] r16748 - /erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Oct 1 16:31:23 CEST 2007
Author: nicolas
Date: Mon Oct 1 16:31:23 2007
New Revision: 16748
URL: http://svn.erp5.org?rev=16748&view=rev
Log:
Set acquisition context when creating Signature, change equality test for None values
Modified:
erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
Modified: erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py?rev=16748&r1=16747&r2=16748&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py (original)
+++ erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py Mon Oct 1 16:31:23 2007
@@ -856,7 +856,7 @@
if isinstance(xml_string, unicode):
xml_string = xml_object.encode('utf-8')
gid = subscriber.getGidFromObject(object)
- signature = Signature(id=gid, object=object)
+ signature = Signature(id=gid, object=object).__of__(subscriber)
signature.setTempXML(xml_object)
if xml_string.count('\n') > self.MAX_LINES:
if xml_string.find('--') >= 0: # This make comment fails, so we need to replace
@@ -875,7 +875,7 @@
signature.setAction('Add')
xml_string = '<!--' + short_string + '-->'
gid = signature.getRid()#in fisrt, we try with rid if there is one
- if gid == None:
+ if gid is None:
gid = signature.getGid()
syncml_data += self.addXMLObject(
cmd_id=cmd_id,
More information about the Erp5-report
mailing list