summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
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 73acdd1..fccfcdf 100644
--- a/Lib/ConfigParser.py
+++ b/Lib/ConfigParser.py
@@ -343,6 +343,8 @@ class RawConfigParser:
def set(self, section, option, value):
"""Set an option."""
+ if not isinstance(value, basestring):
+ raise TypeError("option values must be strings")
if not section or section == DEFAULTSECT:
sectdict = self._defaults
else: