mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-31307: Make ConfigParser.read() accept bytes objects (GH-3420)
This commit is contained in:
parent
a64ce973a3
commit
e314853d57
4 changed files with 25 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue