summaryrefslogtreecommitdiffstats
path: root/Lib/configparser.py
diff options
context:
space:
mode:
authorsobolevn <mail@sobolevn.me>2025-04-16 10:39:11 (GMT)
committerGitHub <noreply@github.com>2025-04-16 10:39:11 (GMT)
commitc35c7353eb8fbccff2d3a6ab664426b31af00d4d (patch)
treea67b38505aff674505ec4d32affc3a87a913594e /Lib/configparser.py
parent8b7cb947c5046d8fb32aad532048de87e09ed3f9 (diff)
downloadcpython-c35c7353eb8fbccff2d3a6ab664426b31af00d4d.zip
cpython-c35c7353eb8fbccff2d3a6ab664426b31af00d4d.tar.gz
cpython-c35c7353eb8fbccff2d3a6ab664426b31af00d4d.tar.bz2
gh-130941: Fix `configparser` parsing values with `allow_no_value` and `interpolation` set (GH-130949)
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r--Lib/configparser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py
index 70cc651..239fda6 100644
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -541,6 +541,8 @@ class ExtendedInterpolation(Interpolation):
except (KeyError, NoSectionError, NoOptionError):
raise InterpolationMissingOptionError(
option, section, rawval, ":".join(path)) from None
+ if v is None:
+ continue
if "$" in v:
self._interpolate_some(parser, opt, accum, v, sect,
dict(parser.items(sect, raw=True)),