mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/tglx/remail.git
synced 2024-11-28 07:12: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.
|
||||
txt = re_rmlfcr.sub(' ', txt)
|
||||
|
||||
for k in msg.keys():
|
||||
if hdr.lower() == k.lower():
|
||||
msg.replace_header(k, txt)
|
||||
return
|
||||
# Not found set new
|
||||
msg[hdr] = txt
|
||||
if msg.get(hdr):
|
||||
msg.replace_header(hdr, txt)
|
||||
else:
|
||||
msg[hdr] = txt
|
||||
|
||||
payload_valid_mime_headers = [
|
||||
'Content-Description',
|
||||
|
|
Loading…
Reference in a new issue