Doc: Keep the venv/* exclude pattern. (GH-15229)
authorJulien Palard <julien@palard.fr>
Mon, 26 Aug 2019 06:11:43 +0000 (08:11 +0200)
committerNed Deily <nad@python.org>
Mon, 26 Aug 2019 06:11:43 +0000 (02:11 -0400)
In case it has been previously created.

Doc/conf.py

index e85ea5b2d2ff49b927dbbee9297bbed0e3f2e3dd..abaa760c98c1aa24c5109d30db2f3e358b9bb2a7 100644 (file)
@@ -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 = {