diff options
author | Just van Rossum <just@letterror.com> | 2003-01-17 20:02:06 (GMT) |
---|---|---|
committer | Just van Rossum <just@letterror.com> | 2003-01-17 20:02:06 (GMT) |
commit | 504377d4ddc997bce8165571684729b7b31fccb8 (patch) | |
tree | 3b425863883b4d3993fd01e95c4db96961f7c8c3 /Lib/plat-mac/bundlebuilder.py | |
parent | 7b0cf76b72a499c692e444c75b4833475fa56db0 (diff) | |
download | cpython-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-x | Lib/plat-mac/bundlebuilder.py | 2 |
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) |