mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 04c2917d6c983ec4467600899a271e239f993f82
parent 412e1941ff67203966081305accb87ed79df2310
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 14 Dec 2019 10:31:44 +0100

no newlines in email headers

Diffstat:
get_email_header | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/get_email_header b/get_email_header @@ -18,6 +18,6 @@ try: except (HeaderParseError, UnicodeDecodeError): # maybe warn about error? subj = message['subject'] subj = subj.decode("utf-8") if isinstance(subj, bytes) else subj -print(subj) +print(subj.strip().replace('\n', ''))