mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/tglx/remail.git
synced 2024-11-24 21:32:39 +01:00
remail: Simplify msg_set_header()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
88f8e48b13
commit
c3b13e47f7
1 changed files with 4 additions and 6 deletions
|
@ -195,12 +195,10 @@ def msg_set_header(msg, hdr, txt):
|
||||||
# come with wreckaged headers.
|
# come with wreckaged headers.
|
||||||
txt = re_rmlfcr.sub(' ', txt)
|
txt = re_rmlfcr.sub(' ', txt)
|
||||||
|
|
||||||
for k in msg.keys():
|
if msg.get(hdr):
|
||||||
if hdr.lower() == k.lower():
|
msg.replace_header(hdr, txt)
|
||||||
msg.replace_header(k, txt)
|
else:
|
||||||
return
|
msg[hdr] = txt
|
||||||
# Not found set new
|
|
||||||
msg[hdr] = txt
|
|
||||||
|
|
||||||
payload_valid_mime_headers = [
|
payload_valid_mime_headers = [
|
||||||
'Content-Description',
|
'Content-Description',
|
||||||
|
|
Loading…
Reference in a new issue