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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 7 10:51:04 CET 2006


Author: jerome
Date: Tue Nov  7 10:51:00 2006
New Revision: 11145

URL: http://svn.erp5.org?rev=11145&view=rev
Log:
replace tabs by space, call the exception constructo before returning it.


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=11145&r1=11144&r2=11145&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoUtils.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoUtils.py Tue Nov  7 10:51:00 2006
@@ -90,12 +90,12 @@
     except RuntimeError:
       zf = ZipFile(self._document, mode='a')
     try:
-	    # remove the file first if it exists
-	    fi = zf.getinfo(filename)
-	    zf.filelist.remove( fi )
+      # remove the file first if it exists
+      fi = zf.getinfo(filename)
+      zf.filelist.remove( fi )
     except KeyError:
-	    # This is a new file
-	    pass
+      # This is a new file
+      pass
     zf.writestr(filename, stream)
     zf.close()
   
@@ -147,9 +147,6 @@
           tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")'
          office:version='1.0'""")
 
-    """
-    """
-
   security.declarePublic('addFileEntry')
   def addFileEntry(self, full_path, media_type, content=None):
       """ Add a file entry to the manifest and possibly is content """
@@ -238,10 +235,10 @@
     try:
       oo_unzipped = ZipFile(file_descriptor, mode="r")
     except:
-      raise CorruptedOOoFile
+      raise CorruptedOOoFile()
     # Test the integrity of the file
     if oo_unzipped.testzip() != None:
-      raise CorruptedOOoFile
+      raise CorruptedOOoFile()
 
     # Get the filename
     self.filename = file_descriptor.filename




More information about the Erp5-report mailing list