From edfcc28e71acf326dd179b6889487eedf9083faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 8 Oct 2008 09:40:45 +0000 Subject: [PATCH] previous change was wrong, we were not removing the directory, but everythinh inside git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24093 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/custom_zodb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product/ERP5Type/tests/custom_zodb.py b/product/ERP5Type/tests/custom_zodb.py index 060afab25c..fd3bf0dc92 100644 --- a/product/ERP5Type/tests/custom_zodb.py +++ b/product/ERP5Type/tests/custom_zodb.py @@ -1,5 +1,6 @@ import os import shutil +import glob import ZODB from ZODB.DemoStorage import DemoStorage from ZODB.FileStorage import FileStorage @@ -30,7 +31,8 @@ elif os.environ.get('erp5_save_data_fs'): for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'): full_path = os.path.join(instance_home, dir) if os.path.exists(full_path): - shutil.rmtree(full_path) + for f in glob.glob('%s/*' % full_path): + os.unlink(f) if os.path.exists(new_data_fs_path): os.remove(new_data_fs_path) Storage = FileStorage(new_data_fs_path) -- 2.30.9