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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Apr 24 22:16:41 CEST 2007


Author: vincent
Date: Tue Apr 24 22:16:39 2007
New Revision: 14203

URL: http://svn.erp5.org?rev=14203&view=rev
Log:
Make filename property optional to make possible to unit test OOo document import using StringIO object.

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=14203&r1=14202&r2=14203&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoUtils.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoUtils.py Tue Apr 24 22:16:39 2007
@@ -248,7 +248,7 @@
       raise CorruptedOOoFile()
 
     # Get the filename
-    self.filename = file_descriptor.filename
+    self.filename = getattr(file_descriptor, 'filename', 'default_filename')
 
     # List and load the content of the zip file
     for name in oo_unzipped.namelist():




More information about the Erp5-report mailing list