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