From e8c2c8730128ef69fe95107e18deedb88cd36851 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 12 Jan 2019 20:33:09 +0900 Subject: [PATCH] Fix #5928: KeyError: 'DOCUTILSCONFIG' when running build --- CHANGES | 1 + sphinx/util/docutils.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b34a19431..0a65edb10 100644 --- a/CHANGES +++ b/CHANGES @@ -24,6 +24,7 @@ Bugs fixed * #5755: C++, fix duplicate declaration error on function templates with constraints in the return type. * C++, parse unary right fold expressions and binary fold expressions. +* #5928: KeyError: 'DOCUTILSCONFIG' when running build Testing -------- diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index ccd6410ec..e8adc58b3 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -131,7 +131,7 @@ def using_user_docutils_conf(confdir): yield finally: if docutilsconfig is None: - os.environ.pop('DOCUTILSCONFIG') + os.environ.pop('DOCUTILSCONFIG', None) else: os.environ['DOCUTILSCONFIG'] = docutilsconfig