Skip to content

Commit 59bc627

Browse files
committed
Resolve latest comments
2 parents 8069836 + f70bfc5 commit 59bc627

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/configparser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ def read(self, filenames, encoding=None):
758758
if isinstance(filename, os.PathLike):
759759
filename = os.fspath(filename)
760760
read_ok.append(filename)
761+
self._loaded_sources.append(read_ok)
761762
return read_ok
762763

763764
def read_file(self, f, source=None):
@@ -774,6 +775,7 @@ def read_file(self, f, source=None):
774775
except AttributeError:
775776
source = '<???>'
776777
self._read(f, source)
778+
self._loaded_sources.append(source)
777779

778780
def read_string(self, string, source='<string>'):
779781
"""Read configuration from a given string."""
@@ -810,6 +812,7 @@ def read_dict(self, dictionary, source='<dict>'):
810812
raise DuplicateOptionError(section, key, source)
811813
elements_added.add((section, key))
812814
self.set(section, key, value)
815+
self._loaded_sources.append(source)
813816

814817
def get(self, section, option, *, raw=False, vars=None, fallback=_UNSET):
815818
"""Get an option value for a given section.

0 commit comments

Comments
 (0)