[Erp5-report] r16675 - /erp5/trunk/products/ERP5OOo/OOoUtils.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 27 19:35:42 CEST 2007


Author: jerome
Date: Thu Sep 27 19:35:42 2007
New Revision: 16675

URL: http://svn.erp5.org?rev=16675&view=rev
Log:
hiding original expression traceback is wrong, but it's required if we want to
catch the exception in python scripts. So at least we log the traceback.


Modified:
    erp5/trunk/products/ERP5OOo/OOoUtils.py

Modified: erp5/trunk/products/ERP5OOo/OOoUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/OOoUtils.py?rev=16675&r1=16674&r2=16675&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoUtils.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoUtils.py Thu Sep 27 19:35:42 2007
@@ -27,6 +27,8 @@
 #
 ##############################################################################
 
+import sys
+
 from Products.PythonScripts.Utility import allow_class
 from ZPublisher.HTTPRequest import FileUpload
 from xml.dom.ext.reader import PyExpat
@@ -42,6 +44,7 @@
 import random
 from Products.ERP5Type import Permissions
 from zLOG import LOG
+from zLOG import PROBLEM
 
 from OFS.Image import Pdata
 
@@ -242,6 +245,7 @@
     try:
       oo_unzipped = ZipFile(file_descriptor, mode="r")
     except:
+      LOG('ERP5OOo', PROBLEM, 'Error in openFile', error=sys.exc_info())
       raise CorruptedOOoFile()
     # Test the integrity of the file
     if oo_unzipped.testzip() != None:




More information about the Erp5-report mailing list