From f2eacc4dbcb8f976ab12570c0a3c6d53bc3c1c23 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Tue, 25 May 2021 12:57:07 -0400 Subject: Handle situations where -f only has an email Normally, -f would be 'Some Service ', but in case it's just "service@example.org", wrap it in angle brackets properly. Signed-off-by: Konstantin Ryabitsev --- b4/pr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/b4/pr.py b/b4/pr.py index 04feeae..86d039c 100644 --- a/b4/pr.py +++ b/b4/pr.py @@ -298,6 +298,8 @@ def explode(gitdir, lmsg, mailfrom=None, retrieve_links=True, fpopts=None): allcc.append(fromaddr) if realname: # Use "Name via Foo" notation + if mailfrom.find('@') > 0 > mailfrom.find('<'): + mailfrom = f'<{mailfrom}>' mailfrom = f'{realname} via {mailfrom}' config = b4.get_main_config() -- cgit v1.2.3