use os.path.lexists() so it doesn't fail on broken symlinks
authorAndrew Gaffney <agaffney@gentoo.org>
Sun, 29 Nov 2009 03:10:56 +0000 (21:10 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sun, 29 Nov 2009 03:10:56 +0000 (21:10 -0600)
modules/catalyst/util.py

index ddbb694c732a604c23f27cbae71a2afdff130ef2..37ace80c9aef0c4386eab333510ec3ea16ddf297 100644 (file)
@@ -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: