summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/bundlebuilder.py
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2003-01-17 20:02:06 (GMT)
committerJust van Rossum <just@letterror.com>2003-01-17 20:02:06 (GMT)
commit504377d4ddc997bce8165571684729b7b31fccb8 (patch)
tree3b425863883b4d3993fd01e95c4db96961f7c8c3 /Lib/plat-mac/bundlebuilder.py
parent7b0cf76b72a499c692e444c75b4833475fa56db0 (diff)
downloadcpython-504377d4ddc997bce8165571684729b7b31fccb8.zip
cpython-504377d4ddc997bce8165571684729b7b31fccb8.tar.gz
cpython-504377d4ddc997bce8165571684729b7b31fccb8.tar.bz2
make sure src exists before creating a symlink
Diffstat (limited to 'Lib/plat-mac/bundlebuilder.py')
-rwxr-xr-xLib/plat-mac/bundlebuilder.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py
index 45642bd..3034ec5 100755
--- a/Lib/plat-mac/bundlebuilder.py
+++ b/Lib/plat-mac/bundlebuilder.py
@@ -578,6 +578,8 @@ def makedirs(dir):
def symlink(src, dst, mkdirs=0):
"""Copy a file or a directory."""
+ if not os.path.exists(src):
+ raise IOError, "No such file or directory: '%s'" % src
if mkdirs:
makedirs(os.path.dirname(dst))
os.symlink(os.path.abspath(src), dst)