From c18b31900f4249b8598924bb7b88e79e497f7ac9 Mon Sep 17 00:00:00 2001 From: Kent Friesen Date: Tue, 10 Jan 2023 11:02:38 -0800 Subject: [PATCH] get_values now matches get_value behavior when section not found. --- git/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git/config.py b/git/config.py index 71d7ea689..273caa25a 100644 --- a/git/config.py +++ b/git/config.py @@ -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: