Commit 2b9218c7 authored by Nicolas Delaby's avatar Nicolas Delaby

Change equality test for None, typo

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16858 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 74135d02
...@@ -829,7 +829,7 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -829,7 +829,7 @@ class XMLSyncUtilsMixin(SyncCode):
if max is not None and loop >= max: if max is not None and loop >= max:
result['finished'] = 0 result['finished'] = 0
break break
#LOG('getSyncMLData object_path', DEBUG, object_path) #LOG('getSyncMLData object_path', INFO, object_path)
object = self.unrestrictedTraverse(object_path) object = self.unrestrictedTraverse(object_path)
status = self.SENT status = self.SENT
object_gid = domain.getGidFromObject(object) object_gid = domain.getGidFromObject(object)
...@@ -1265,10 +1265,10 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -1265,10 +1265,10 @@ class XMLSyncUtilsMixin(SyncCode):
if object_gid in ('', None, []): if object_gid in ('', None, []):
object_gid = status['target'] object_gid = status['target']
status_code = int(status['code']) status_code = int(status['code'])
if status_cmd in ('Add','Replace'): if status_cmd in ('Add','Replace',):
has_status_list = 1 has_status_list = 1
signature = subscriber.getSignatureFromGid(object_gid) signature = subscriber.getSignatureFromGid(object_gid)
if signature == None: if signature is None:
signature = subscriber.getSignatureFromRid(object_gid) signature = subscriber.getSignatureFromRid(object_gid)
if status_code == self.CHUNK_OK: if status_code == self.CHUNK_OK:
destination_waiting_more_data = 1 destination_waiting_more_data = 1
...@@ -1680,10 +1680,10 @@ class XMLSyncUtils(XMLSyncUtilsMixin): ...@@ -1680,10 +1680,10 @@ class XMLSyncUtils(XMLSyncUtilsMixin):
""" """
response = None #check if subsync replies to this messages response = None #check if subsync replies to this messages
subscription = self.unrestrictedTraverse(subscription_path) subscription = self.unrestrictedTraverse(subscription_path)
if msg==None and (subscription.getSubscriptionUrl()).find('file')>=0: if msg is None and (subscription.getSubscriptionUrl()).find('file')>=0:
msg = self.readResponse(sync_id=subscription.getSubscriptionUrl(), msg = self.readResponse(sync_id=subscription.getSubscriptionUrl(),
from_url=subscription.getSubscriptionUrl()) from_url=subscription.getSubscriptionUrl())
if msg==None: if msg is None:
response = self.SubSyncInit(subscription) response = self.SubSyncInit(subscription)
else: else:
xml_client = msg xml_client = msg
......
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