diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-03-24 16:02:40 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-03-24 16:04:19 -0400 |
commit | 13a7694840c06bbd49875e16d68017dd44e937ab (patch) | |
tree | 5e684e857d203b84a26faf67f8046337053c1f27 | |
parent | 263118a2699543933536ad5172ff473fc4b7fd06 (diff) | |
download | b4-13a7694840c06bbd49875e16d68017dd44e937ab.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.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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: |