[Erp5-report] r41904 gabriel - /erp5/trunk/utils/cloudooo/cloudooo/document.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 31 10:19:22 CET 2010
Author: gabriel
Date: Fri Dec 31 10:19:22 2010
New Revision: 41904
URL: http://svn.erp5.org?rev=41904&view=rev
Log:
fix test testSendZipFile. The zipfile should not be returned with the document
Modified:
erp5/trunk/utils/cloudooo/cloudooo/document.py
Modified: erp5/trunk/utils/cloudooo/cloudooo/document.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/document.py?rev=41904&r1=41903&r2=41904&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/document.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/document.py [utf8] Fri Dec 31 10:19:22 2010
@@ -71,6 +71,7 @@ class FileSystemDocument(object):
open(file_path, 'wb').write(self.original_data)
# If is a zipfile is need extract all files from whitin the compressed file
if is_zipfile(file_path):
+ zip_path = file_path
zipfile = ZipFile(file_path)
zip_filename_list = zipfile.namelist()
if 'mimetype' not in zip_filename_list and \
@@ -86,6 +87,7 @@ class FileSystemDocument(object):
if mimetypes.guess_type(filename)[0] in mimetype_list:
file_path = join(self.directory_name, filename)
break
+ remove(zip_path)
return file_path
def getContent(self, zip=False):
More information about the Erp5-report
mailing list