[Erp5-report] r32890 kazuhiko - /erp5/trunk/products/ERP5/Tool/TrashTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 22 04:16:00 CET 2010
Author: kazuhiko
Date: Mon Feb 22 04:15:58 2010
New Revision: 32890
URL: http://svn.erp5.org?rev=32890&view=rev
Log:
if a module for the old object is already removed, we cannot backup the object.
Modified:
erp5/trunk/products/ERP5/Tool/TrashTool.py
Modified: erp5/trunk/products/ERP5/Tool/TrashTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/TrashTool.py?rev=32890&r1=32889&r2=32890&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/TrashTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/TrashTool.py [utf8] Mon Feb 22 04:15:58 2010
@@ -100,8 +100,8 @@
o = o.aq_parent
connection=o._p_jar
copy.seek(0)
- backup = connection.importFile(copy)
try:
+ backup = connection.importFile(copy)
backup.isIndexable = ConstantGetter('isIndexable', value=False)
try:
# the isIndexable setting above avoids the recursion of
@@ -115,10 +115,11 @@
# BACK: On Zope 2.8. _setObject does not accept "suppress_events"
# remove when we drop support
backup_object_container._setObject(object_id, backup)
- except AttributeError:
- # XXX we can go here due to formulator because attribute field_added
- # doesn't not exists on parent if it is a Trash Folder and not a Form
- # so object is not backup
+ except (AttributeError, ImportError):
+ # XXX we can go here due to formulator because attribute
+ # field_added doesn't not exists on parent if it is a Trash
+ # Folder and not a Form, or a module for the old object is
+ # already removed, and we cannot backup the object
LOG("Trash Tool backupObject", 100, "Can't backup object %s" %(object_id))
pass
More information about the Erp5-report
mailing list