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

replace tabs by space, call the exception constructo before returning it.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11145 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5c3c9395
...@@ -147,9 +147,6 @@ class OOoBuilder: ...@@ -147,9 +147,6 @@ class OOoBuilder:
tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")' tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")'
office:version='1.0'""") office:version='1.0'""")
"""
"""
security.declarePublic('addFileEntry') security.declarePublic('addFileEntry')
def addFileEntry(self, full_path, media_type, content=None): def addFileEntry(self, full_path, media_type, content=None):
""" Add a file entry to the manifest and possibly is content """ """ Add a file entry to the manifest and possibly is content """
...@@ -238,10 +235,10 @@ class OOoParser: ...@@ -238,10 +235,10 @@ class OOoParser:
try: try:
oo_unzipped = ZipFile(file_descriptor, mode="r") oo_unzipped = ZipFile(file_descriptor, mode="r")
except: except:
raise CorruptedOOoFile raise CorruptedOOoFile()
# Test the integrity of the file # Test the integrity of the file
if oo_unzipped.testzip() != None: if oo_unzipped.testzip() != None:
raise CorruptedOOoFile raise CorruptedOOoFile()
# Get the filename # Get the filename
self.filename = file_descriptor.filename self.filename = file_descriptor.filename
......
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