Skip to content

Commit 94666c6

Browse files
lpyu001picnixz
andauthored
Update Lib/configparser.py
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent ae3cbfb commit 94666c6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/configparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ def _convert_to_boolean(self, value):
12241224
"""
12251225
if value is None:
12261226
raise ValueError('Not a boolean: None')
1227-
if value.lower() not in self.BOOLEAN_STATES:
1227+
if value is None or value.lower() not in self.BOOLEAN_STATES:
12281228
raise ValueError('Not a boolean: %s' % value)
12291229
return self.BOOLEAN_STATES[value.lower()]
12301230

0 commit comments

Comments
 (0)