From fe4bbe674409029377420b1c86011677990d19cb Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Fri, 9 Feb 2007 11:51:22 +0000
Subject: [PATCH] unlink broken symlinks instead of raising exceptions.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12594 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/tests/runUnitTest.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/tests/runUnitTest.py b/product/ERP5Type/tests/runUnitTest.py
index b174f7e1d3..83cb9f1512 100755
--- a/product/ERP5Type/tests/runUnitTest.py
+++ b/product/ERP5Type/tests/runUnitTest.py
@@ -66,13 +66,13 @@ def initializeInstanceHome(tests_framework_home,
     dst = os.path.join(instance_home, d)
     if not os.path.exists(dst):
       if os.path.lexists(dst):
-        raise RuntimeError, '%s is a broken symlink' % dst
+        os.unlink(dst)
       os.symlink(src, dst)
   src = os.path.join(tests_framework_home, 'custom_zodb.py')
   dst = os.path.join(instance_home, 'custom_zodb.py')
   if not os.path.exists(dst):
     if os.path.lexists(dst):
-      raise RuntimeError, '%s is a broken symlink' % dst
+      os.unlink(dst)
     os.symlink(src, dst)
   sys.path.append(os.path.join(zope_home, "bin"))
   import copyzopeskel
-- 
2.30.9