summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-16 14:19:00 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-16 14:19:00 -0400
commit0e78612f3718db074ea4df2c91d5a20bde2df911 (patch)
treee8c9b9823f9b39334b0f9ddc81e79e32a184861b
parent9fbf26bbe089875ab88543c9043962d6d195a4f0 (diff)
downloadb4-0e78612f3718db074ea4df2c91d5a20bde2df911.tar.gz
Add support for the Fixes: follow-up trailer
We now properly locate and process Fixes: trailers. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 46c2ffc..203a0ed 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -19,7 +19,7 @@ from email import charset
charset.add_charset('utf-8', None)
emlpolicy = email.policy.EmailPolicy(utf8=True, cte_type='8bit', max_line_length=None)
-VERSION = '0.3.0'
+VERSION = '0.3.1'
ATTESTATION_FORMAT_VER = '0.1'
logger = logging.getLogger('b4')
@@ -517,6 +517,12 @@ class LoreMessage:
# We only pay attention to trailers that are sent in reply
if self.reply:
+ # Do we have a Fixes: trailer?
+ matches = re.findall(r'^\s*Fixes:[ \t]+([a-f0-9]+\s+\(.*\))\s*$', self.body, re.MULTILINE)
+ if matches:
+ for tvalue in matches:
+ self.trailers.append(('Fixes', tvalue))
+
# Do we have something that looks like a person-trailer?
matches = re.findall(r'^\s*([\w-]+):[ \t]+(.*<\S+>)\s*$', self.body, re.MULTILINE)
if matches: