aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-24 16:02:40 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-24 16:02:40 -0400
commit9475be9cbeaaf2d7e8bac022a5ac6df8d580cb98 (patch)
tree4babb448f0288460ad65a85741e81990480c6c23
parentb6ada31e46a9345ee69ad8a807cd406a8f8897f7 (diff)
downloadb4-9475be9cbeaaf2d7e8bac022a5ac6df8d580cb98.tar.gz
Strip leading id:/rfc822msgid:
When piped from other tools, the msgid may be prepended by extraneous info, so strip it to grab the actual msgid. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/mbox.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/b4/mbox.py b/b4/mbox.py
index bb18fc9..5e301c2 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -385,6 +385,9 @@ def main(cmdargs):
# Infer the project name from the URL, if possible
if chunks[0] != 'r':
cmdargs.useproject = chunks[0]
+ # Handle special case when msgid is prepended by id: or rfc822msgid:
+ if msgid.find('id:') >= 0:
+ msgid = re.sub(r'^\w*id:', '', msgid)
mboxfile = get_pi_thread_by_msgid(msgid, config, cmdargs)
if mboxfile is None: