Missing check on a key existing for a dict
This commit is contained in:
parent
46867490a6
commit
86cdbf7a4e
1 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,8 @@ for sect in _cfg.sections():
|
|||
raw = sys.stdin.read()
|
||||
raw_message = email.message_from_string( raw )
|
||||
from_addr = raw_message['From']
|
||||
to_addrs = map(lambda x: x.strip(), raw_message['To'].split(','))
|
||||
if raw_message.has_key('To'):
|
||||
to_addrs = map(lambda x: x.strip(), raw_message['To'].split(','))
|
||||
if raw_message.has_key('Cc'):
|
||||
to_addrs.extend( map(lambda x: x.strip(), raw_message['Cc'].split(',')))
|
||||
if raw_message.has_key('Bcc'):
|
||||
|
|
Loading…
Reference in a new issue