summaryrefslogtreecommitdiffstats
path: root/Lib/configparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r--Lib/configparser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py
index 708553d..794f857 100644
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -191,7 +191,7 @@ class DuplicateSectionError(Error):
def __init__(self, section, source=None, lineno=None):
msg = [repr(section), " already exists"]
if source is not None:
- message = ["While reading from ", source]
+ message = ["While reading from ", repr(source)]
if lineno is not None:
message.append(" [line {0:2d}]".format(lineno))
message.append(": section ")
@@ -217,7 +217,7 @@ class DuplicateOptionError(Error):
msg = [repr(option), " in section ", repr(section),
" already exists"]
if source is not None:
- message = ["While reading from ", source]
+ message = ["While reading from ", repr(source)]
if lineno is not None:
message.append(" [line {0:2d}]".format(lineno))
message.append(": option ")