[config] fix using same key multiple times with 'apply' (#7127)
This commit is contained in:
@@ -322,6 +322,7 @@ class apply():
|
||||
set(path, key, value)
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
self.original.reverse()
|
||||
for path, key, value in self.original:
|
||||
if value is util.SENTINEL:
|
||||
unset(path, key)
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
__version__ = "1.29.2"
|
||||
__version__ = "1.29.3-dev"
|
||||
__variant__ = None
|
||||
|
||||
@@ -168,6 +168,7 @@ class TestConfig(unittest.TestCase):
|
||||
options = (
|
||||
(("b",) , "c", [1, 2, 3]),
|
||||
(("e", "f"), "g", 234),
|
||||
(("e", "f"), "g", 234),
|
||||
)
|
||||
|
||||
self.assertEqual(config.get(("b",) , "c"), "text")
|
||||
|
||||
Reference in New Issue
Block a user