Commit fe4bbe67 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

unlink broken symlinks instead of raising exceptions.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12594 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b4794e1e
...@@ -66,13 +66,13 @@ def initializeInstanceHome(tests_framework_home, ...@@ -66,13 +66,13 @@ def initializeInstanceHome(tests_framework_home,
dst = os.path.join(instance_home, d) dst = os.path.join(instance_home, d)
if not os.path.exists(dst): if not os.path.exists(dst):
if os.path.lexists(dst): if os.path.lexists(dst):
raise RuntimeError, '%s is a broken symlink' % dst os.unlink(dst)
os.symlink(src, dst) os.symlink(src, dst)
src = os.path.join(tests_framework_home, 'custom_zodb.py') src = os.path.join(tests_framework_home, 'custom_zodb.py')
dst = os.path.join(instance_home, 'custom_zodb.py') dst = os.path.join(instance_home, 'custom_zodb.py')
if not os.path.exists(dst): if not os.path.exists(dst):
if os.path.lexists(dst): if os.path.lexists(dst):
raise RuntimeError, '%s is a broken symlink' % dst os.unlink(dst)
os.symlink(src, dst) os.symlink(src, dst)
sys.path.append(os.path.join(zope_home, "bin")) sys.path.append(os.path.join(zope_home, "bin"))
import copyzopeskel import copyzopeskel
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment