]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Doc: Keep the venv/* exclude pattern. (GH-15229)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 26 Aug 2019 06:19:58 +0000 (23:19 -0700)
committerGitHub <noreply@github.com>
Mon, 26 Aug 2019 06:19:58 +0000 (23:19 -0700)
In case it has been previously created.
(cherry picked from commit 73e054970193fc421c533564a4189be522f9c331)

Co-authored-by: Julien Palard <julien@palard.fr>
Doc/conf.py

index da8b9d7b2a65bce03f4ae68e712cb4654836444b..ce2d47f5f8939eee22df3db10d11d50283bb11dc 100644 (file)
@@ -38,8 +38,10 @@ highlight_language = 'python3'
 needs_sphinx = "1.6.6"
 
 # 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 = {