Skip to content

Commit c18b319

Browse files
committed
get_values now matches get_value behavior when section not found.
1 parent fbc36f9 commit c18b319

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: git/config.py

+4
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,10 @@ def get_values(
796796
:raise TypeError: in case the value could not be understood
797797
Otherwise the exceptions known to the ConfigParser will be raised."""
798798
try:
799+
_section_list = self.sections()
800+
if section not in _section_list:
801+
raise cp.NoSectionError(section)
802+
799803
lst = self._sections[section].getall(option)
800804
except Exception:
801805
if default is not None:

0 commit comments

Comments
 (0)