From 3329062e32432ea8ae071a9775527dccd8adeb78 Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Tue, 8 Jul 2025 12:22:47 +0200 Subject: [PATCH] Bug: dict.copy() always returns None We need the merged defaults copy returned to us, so the old return is instead split into three commands: - copy `defaults` - update the copy with `match.groupdict()` - return the updated copy --- tools/hook-scripts/mailer/mailer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/hook-scripts/mailer/mailer.py b/tools/hook-scripts/mailer/mailer.py index ce4197168e735..7106613a4ec92 100755 --- a/tools/hook-scripts/mailer/mailer.py +++ b/tools/hook-scripts/mailer/mailer.py @@ -1401,7 +1401,9 @@ def repos_params(section_name, defaults): # Extract key/value pairs from the regex match of this # repository, and merge them into the default params. # Make sure to copy() to avoid mutation of the argument. - return defaults.copy().update(match.groupdict()) + merged_defaults = defaults.copy() + merged_defaults.update(match.groupdict()) + return merged_defaults # There are no repository-specific key/value params, to add. return defaults