Commit 8db5289b authored by Sebastien Robin's avatar Sebastien Robin

added TypeError in the list of errors possible with _getOb


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@470 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0b1eccae
...@@ -142,7 +142,7 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -142,7 +142,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
if object_id is not None: if object_id is not None:
try: try:
subobject = object._getOb(object_id) subobject = object._getOb(object_id)
except (AttributeError, KeyError): except (AttributeError, KeyError, TypeError):
subobject = None subobject = None
if subobject is None: # If so, it doesn't exist if subobject is None: # If so, it doesn't exist
portal_type = '' portal_type = ''
...@@ -185,7 +185,7 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -185,7 +185,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
sub_object = None sub_object = None
try: try:
sub_object = object._getOb(sub_object_id) sub_object = object._getOb(sub_object_id)
except (AttributeError, KeyError): except (AttributeError, KeyError, TypeError):
pass pass
if sub_object is not None: if sub_object is not None:
LOG('addNode',0,'subobject.id: %s' % sub_object.id) LOG('addNode',0,'subobject.id: %s' % sub_object.id)
...@@ -261,7 +261,7 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -261,7 +261,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
sub_xml = self.getSubObjectXupdate(xml) sub_xml = self.getSubObjectXupdate(xml)
conflict_list += self.deleteNode(xml=sub_xml,object=sub_object, conflict_list += self.deleteNode(xml=sub_xml,object=sub_object,
force=force, simulate=simulate, **kw) force=force, simulate=simulate, **kw)
except (KeyError, AttributeError): except (KeyError, AttributeError, TypeError):
LOG('ERP5Conduit',0,'deleteNode, Unable to delete SubObject: %s' % str(sub_object_id)) LOG('ERP5Conduit',0,'deleteNode, Unable to delete SubObject: %s' % str(sub_object_id))
pass pass
if object_id is not None: # We do have an object_id if object_id is not None: # We do have an object_id
......
...@@ -643,7 +643,7 @@ class Subscription(SyncCode, Implicit): ...@@ -643,7 +643,7 @@ class Subscription(SyncCode, Implicit):
o = None o = None
try: try:
o = destination._getOb(o_id) o = destination._getOb(o_id)
except (AttributeError, KeyError): except (AttributeError, KeyError, TypeError):
pass pass
if o is not None and o in object_list: if o is not None and o in object_list:
return o return o
......
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