summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Palard <julien@palard.fr>2019-08-26 06:11:43 (GMT)
committerNed Deily <nad@python.org>2019-08-26 06:11:43 (GMT)
commit73e054970193fc421c533564a4189be522f9c331 (patch)
tree84b857228d246de1176cf24ed51007f1e07b7226
parentda27d9b9dc44913ffee8f28d9638985eaaa03755 (diff)
downloadcpython-73e054970193fc421c533564a4189be522f9c331.zip
cpython-73e054970193fc421c533564a4189be522f9c331.tar.gz
cpython-73e054970193fc421c533564a4189be522f9c331.tar.bz2
Doc: Keep the venv/* exclude pattern. (GH-15229)
In case it has been previously created.
-rw-r--r--Doc/conf.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/conf.py b/Doc/conf.py
index e85ea5b..abaa760 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -48,8 +48,10 @@ highlight_language = 'python3'
needs_sphinx = '1.8'
# Ignore any .rst files in the venv/ directory.
-venvdir = os.getenv('VENVDIR', 'venv')
-exclude_patterns = [venvdir+'/*', 'README.rst']
+exclude_patterns = ['venv/*', 'README.rst']
+venvdir = os.getenv('VENVDIR')
+if venvdir is not None:
+ exclude_patterns.append(venvdir + '/*')
# Disable Docutils smartquotes for several translations
smartquotes_excludes = {