Skip to content

Commit

Permalink
Avoid showing None as CC/BCC
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster committed Mar 20, 2015
1 parent 325a75d commit 476f838
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions maildump/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ def add_message(sender, recipients, body, message):
"""

all_recipients = {'to': map(decode_header, recipients),
'cc': split_addresses(decode_header(message['CC'])),
'bcc': split_addresses(decode_header(message['BCC']))}

'cc': split_addresses(decode_header(message['CC'])) if 'CC' in message else [],
'bcc': split_addresses(decode_header(message['BCC'])) if 'BCC' in message else []}
cur = _conn.cursor()
cur.execute(sql, (decode_header(sender),
json.dumps(all_recipients),
Expand Down

0 comments on commit 476f838

Please sign in to comment.