diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-06 20:52:23 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-06 20:52:23 (GMT) |
commit | a26b3f183d1101a21c51a5bd0c75834dfe859039 (patch) | |
tree | 22d428add046e60444327110f7b57cc6bf819c6c /Lib/configparser.py | |
parent | a146bef02bf26b75d8d720f444283e28e784a1e3 (diff) | |
parent | bc27a050a7bef228c5e125c4de938faef56533fd (diff) | |
download | cpython-a26b3f183d1101a21c51a5bd0c75834dfe859039.zip cpython-a26b3f183d1101a21c51a5bd0c75834dfe859039.tar.gz cpython-a26b3f183d1101a21c51a5bd0c75834dfe859039.tar.bz2 |
Issue #20363. Fixed BytesWarning triggerred by test suite.
Patch by Berker Peksag.
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r-- | Lib/configparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py index c0752ce..4ee8307 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -286,7 +286,7 @@ class ParsingError(Error): raise ValueError("Required argument `source' not given.") elif filename: source = filename - Error.__init__(self, 'Source contains parsing errors: %s' % source) + Error.__init__(self, 'Source contains parsing errors: %r' % source) self.source = source self.errors = [] self.args = (source, ) @@ -322,7 +322,7 @@ class MissingSectionHeaderError(ParsingError): def __init__(self, filename, lineno, line): Error.__init__( self, - 'File contains no section headers.\nfile: %s, line: %d\n%r' % + 'File contains no section headers.\nfile: %r, line: %d\n%r' % (filename, lineno, line)) self.source = filename self.lineno = lineno |