diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-04-10 16:05:54 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-04-10 16:05:54 -0400 |
commit | 4b693fe7edc1f0d42109291284e3ad822725923e (patch) | |
tree | 705e7897708e307092572f979660d99775111f2b /b4/__init__.py | |
parent | 3f06f6fb40b41813e946154d591f4d1f37b52f85 (diff) | |
download | b4-4b693fe7edc1f0d42109291284e3ad822725923e.tar.gz |
Use ~/.signature if it exists for tpt defaults
If we find a ~/.signature, then use it for making a default ${signature}
value, otherwise make a "Name <email>" boring one.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/__init__.py')
-rw-r--r-- | b4/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py index a49f439..d432ab1 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -643,6 +643,8 @@ class LoreMessage: fromdata = email.utils.getaddresses([str(x) for x in self.msg.get_all('from', [])])[0] self.fromname = fromdata[0] self.fromemail = fromdata[1] + if not len(self.fromname.strip()): + self.fromname = self.fromemail except IndexError: pass |