From: Andrew Gaffney Date: Sun, 29 Nov 2009 03:10:56 +0000 (-0600) Subject: use os.path.lexists() so it doesn't fail on broken symlinks X-Git-Tag: CATALYST-2.0.10~3^2~75 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ff814d5ece9c636d78265a1130551f113d977f3;p=catalyst.git use os.path.lexists() so it doesn't fail on broken symlinks --- diff --git a/modules/catalyst/util.py b/modules/catalyst/util.py index ddbb694c..37ace80c 100644 --- a/modules/catalyst/util.py +++ b/modules/catalyst/util.py @@ -228,7 +228,7 @@ def empty_dir(path): raise CatalystError("Could not empty directory '%s'" % (path,)) def create_symlink(src, dest, remove_existing=False): - if os.path.exists(dest): + if os.path.lexists(dest): if remove_existing: remove_path(dest) else: