diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-05-25 12:57:07 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-05-25 12:57:07 -0400 |
commit | f2eacc4dbcb8f976ab12570c0a3c6d53bc3c1c23 (patch) | |
tree | cb85453f996c2fbcf22700a13134d246af4f1a50 | |
parent | 422db9f1e80e04e559ba5a6c5458c693d29b4e05 (diff) | |
download | b4-f2eacc4dbcb8f976ab12570c0a3c6d53bc3c1c23.tar.gz |
Handle situations where -f only has an email
Normally, -f would be 'Some Service <service@example.org>', but in case
it's just "service@example.org", wrap it in angle brackets properly.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/pr.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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() |