Commit ec9ccef1 authored by Jérome Perrin's avatar Jérome Perrin

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.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16675 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d1ec368a
......@@ -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 imghdr
import random
from Products.ERP5Type import Permissions
from zLOG import LOG
from zLOG import PROBLEM
from OFS.Image import Pdata
......@@ -242,6 +245,7 @@ class OOoParser:
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:
......
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