bpo-31307: Make ConfigParser.read() accept bytes objects (GH-3420)

This commit is contained in:
Vincent Michel 2017-11-02 13:47:04 +01:00 committed by Berker Peksag
parent a64ce973a3
commit e314853d57
4 changed files with 25 additions and 2 deletions

View file

@ -687,7 +687,7 @@ class RawConfigParser(MutableMapping):
Return list of successfully read files.
"""
if isinstance(filenames, (str, os.PathLike)):
if isinstance(filenames, (str, bytes, os.PathLike)):
filenames = [filenames]
read_ok = []
for filename in filenames: