[Erp5-report] r33940 jm - /erp5/trunk/products/ERP5Type/tests/custom_zodb.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Mar 19 23:44:22 CET 2010
Author: jm
Date: Fri Mar 19 23:44:22 2010
New Revision: 33940
URL: http://svn.erp5.org?rev=33940&view=rev
Log:
Fix [33931]
Modified:
erp5/trunk/products/ERP5Type/tests/custom_zodb.py
Modified: erp5/trunk/products/ERP5Type/tests/custom_zodb.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/custom_zodb.py?rev=33940&r1=33939&r2=33940&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/custom_zodb.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/custom_zodb.py [utf8] Fri Mar 19 23:44:22 2010
@@ -1,4 +1,3 @@
-import errno
import os
import shutil
import sys
@@ -20,11 +19,8 @@
_print("Cleaning static files ... ")
static_dir_list = 'Constraint', 'Document', 'PropertySheet', 'Extensions'
for dir in static_dir_list:
- try:
- shutil.rmtree(os.path.join(instance_home, dir))
- except OSError, e:
- if e.errno != errno.ENOENT:
- raise
+ for f in glob.glob(os.path.join(instance_home, dir, '*')):
+ os.remove(f)
if load:
dump_sql = os.path.join(instance_home, 'dump.sql')
@@ -38,6 +34,7 @@
for dir in static_dir_list:
full_path = os.path.join(instance_home, dir)
if os.path.exists(full_path + '.bak'):
+ os.rmdir(full_path)
shutil.copytree(full_path + '.bak', full_path, symlinks=True)
elif save and os.path.exists(data_fs_path):
os.remove(data_fs_path)
More information about the Erp5-report
mailing list