Commit 223b8e66 authored by Nicolas Delaby's avatar Nicolas Delaby

coding style only

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35811 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf56d5b7
...@@ -757,7 +757,7 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -757,7 +757,7 @@ class XMLSyncUtilsMixin(SyncCode):
signature.getStatus() != self.PARTIAL) or\ signature.getStatus() != self.PARTIAL) or\
self.getAlertCodeFromXML(remote_xml) == self.SLOW_SYNC: self.getAlertCodeFromXML(remote_xml) == self.SLOW_SYNC:
#LOG('getSyncMLData', DEBUG, 'Current object.getPath: %s' % object.getPath()) #LOG('getSyncMLData', DEBUG, 'Current object.getPath: %s' % object.getPath())
xml_string = conduit.getXMLFromObjectWithId(object,\ xml_string = conduit.getXMLFromObjectWithId(object,
xml_mapping=domain.getXMLMapping()) xml_mapping=domain.getXMLMapping())
gid = subscriber.getGidFromObject(object) gid = subscriber.getGidFromObject(object)
signature = Signature(id=gid, object=object).__of__(subscriber) signature = Signature(id=gid, object=object).__of__(subscriber)
...@@ -783,7 +783,7 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -783,7 +783,7 @@ class XMLSyncUtilsMixin(SyncCode):
elif signature.getStatus() in (self.NOT_SYNCHRONIZED, elif signature.getStatus() in (self.NOT_SYNCHRONIZED,
self.PUB_CONFLICT_MERGE,): self.PUB_CONFLICT_MERGE,):
# We don't have synchronized this object yet but it has a signature # We don't have synchronized this object yet but it has a signature
xml_object = conduit.getXMLFromObjectWithId(object,\ xml_object = conduit.getXMLFromObjectWithId(object,
xml_mapping=domain.getXMLMapping()) xml_mapping=domain.getXMLMapping())
#LOG('getSyncMLData', DEBUG, 'checkMD5: %s' % str(signature.checkMD5(xml_object))) #LOG('getSyncMLData', DEBUG, 'checkMD5: %s' % str(signature.checkMD5(xml_object)))
#LOG('getSyncMLData', DEBUG, 'getStatus: %s' % str(signature.getStatus())) #LOG('getSyncMLData', DEBUG, 'getStatus: %s' % str(signature.getStatus()))
...@@ -1034,7 +1034,7 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -1034,7 +1034,7 @@ class XMLSyncUtilsMixin(SyncCode):
xml_object = etree.tostring(xml_object, encoding='utf-8', xml_object = etree.tostring(xml_object, encoding='utf-8',
pretty_print=True) pretty_print=True)
else: else:
xml_object = conduit.getXMLFromObjectWithId(object,\ xml_object = conduit.getXMLFromObjectWithId(object,
xml_mapping=domain.getXMLMapping()) xml_mapping=domain.getXMLMapping())
signature.setStatus(self.SYNCHRONIZED) signature.setStatus(self.SYNCHRONIZED)
#signature.setId(object.getId()) #signature.setId(object.getId())
...@@ -1062,7 +1062,7 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -1062,7 +1062,7 @@ class XMLSyncUtilsMixin(SyncCode):
previous_xml=previous_xml, previous_xml=previous_xml,
force=force, force=force,
simulate=simulate) simulate=simulate)
xml_object = conduit.getXMLFromObjectWithId(object,\ xml_object = conduit.getXMLFromObjectWithId(object,
xml_mapping=domain.getXMLMapping()) xml_mapping=domain.getXMLMapping())
signature.setTempXML(xml_object) signature.setTempXML(xml_object)
if conflict_list: if conflict_list:
...@@ -1078,7 +1078,7 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -1078,7 +1078,7 @@ class XMLSyncUtilsMixin(SyncCode):
cmd='Replace', cmd='Replace',
sync_code=status_code, sync_code=status_code,
remote_xml=action)) remote_xml=action))
cmd_id +=1 cmd_id += 1
if simulate: if simulate:
# This means we are on the publisher side and we want to store # This means we are on the publisher side and we want to store
# the xupdate from the subscriber and we also want to generate # the xupdate from the subscriber and we also want to generate
...@@ -1088,7 +1088,7 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -1088,7 +1088,7 @@ class XMLSyncUtilsMixin(SyncCode):
signature.setSubscriberXupdate(data_subnode_string) signature.setSubscriberXupdate(data_subnode_string)
elif action.xpath('local-name()') == 'Delete': elif action.xpath('local-name()') == 'Delete':
LOG("applyactionlist delete",INFO,"") #LOG("applyactionlist delete", INFO, "")
object_id = signature.getId() object_id = signature.getId()
#LOG('applyActionList Delete on : ', DEBUG, (signature.getId(), subscriber.getObjectFromGid(object_id))) #LOG('applyActionList Delete on : ', DEBUG, (signature.getId(), subscriber.getObjectFromGid(object_id)))
if subscriber.getMediaType() != self.MEDIA_TYPE['TEXT_XML']: if subscriber.getMediaType() != self.MEDIA_TYPE['TEXT_XML']:
...@@ -1115,7 +1115,7 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -1115,7 +1115,7 @@ class XMLSyncUtilsMixin(SyncCode):
#LOG('applyActionList', DEBUG, 'waiting more data for :%s' % signature.getId()) #LOG('applyActionList', DEBUG, 'waiting more data for :%s' % signature.getId())
xml_confirmation_list.append(self.SyncMLConfirmation( xml_confirmation_list.append(self.SyncMLConfirmation(
cmd_id=cmd_id, cmd_id=cmd_id,
cmd= "%s" % action.xpath('name()'), cmd="%s" % action.xpath('name()'),
sync_code=self.WAITING_DATA, sync_code=self.WAITING_DATA,
remote_xml=action)) remote_xml=action))
if conflict_list and signature is not None: if conflict_list and signature is not None:
......
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