[Erp5-report] r17538 - /erp5/trunk/products/ERP5OOo/Document/OOoDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Nov 12 17:25:13 CET 2007


Author: yusei
Date: Mon Nov 12 17:25:13 2007
New Revision: 17538

URL: http://svn.erp5.org?rev=17538&view=rev
Log:
Prevent AttributeError.

Modified:
    erp5/trunk/products/ERP5OOo/Document/OOoDocument.py

Modified: erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/Document/OOoDocument.py?rev=17538&r1=17537&r2=17538&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/Document/OOoDocument.py (original)
+++ erp5/trunk/products/ERP5OOo/Document/OOoDocument.py Mon Nov 12 17:25:13 2007
@@ -143,7 +143,10 @@
     File._setFile(self, data, precondition=precondition)
     if self.hasBaseData():
       # This is a hack - XXX - new accessor needed to delete properties
-      delattr(self, 'base_data')
+      try:
+        delattr(self, 'base_data')
+      except AttributeError:
+        pass
 
   security.declareProtected(Permissions.View, 'index_html')
   def index_html(self, REQUEST, RESPONSE, format=None, display=None, **kw):




More information about the Erp5-report mailing list