Skip to content

Commit

Permalink
get_values now matches get_value behavior when section not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
kfreezen committed Jan 10, 2023
1 parent fbc36f9 commit c18b319
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,10 @@ def get_values(
:raise TypeError: in case the value could not be understood
Otherwise the exceptions known to the ConfigParser will be raised."""
try:
_section_list = self.sections()
if section not in _section_list:
raise cp.NoSectionError(section)

lst = self._sections[section].getall(option)
except Exception:
if default is not None:
Expand Down

0 comments on commit c18b319

Please sign in to comment.