1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Description: Use lexists instead of exists
os.path.exists returns False for a broken symlink; we want lexists here
Author: Ximin Luo <infinity0@debian.org>
Bug: TODO, file to sage
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/sage/src/sage_setup/docbuild/ext/multidocs.py
+++ b/sage/src/sage_setup/docbuild/ext/multidocs.py
@@ -283,7 +283,7 @@
app.builder.info(bold('linking _static directory.'))
static_dir = os.path.join(app.builder.outdir, '_static')
master_static_dir = os.path.join('..', '_static')
- if os.path.exists(static_dir):
+ if os.path.lexists(static_dir):
if os.path.isdir(static_dir) and not os.path.islink(static_dir):
shutil.rmtree(static_dir)
else:
|