Author vajrasky
Recipients barry, r.david.murray, serhiy.storchaka, vajrasky, Łukasz.Kucharski
Date 2014-05-31.16:50:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401555026.67.0.493104497867.issue21476@psf.upfronthosting.co.za>
In-reply-to
Content
The Parse class does not throw exception if given invalid message:

Assume /tmp/a.txt contains garbage, such as: "&&&&&"

With this code:

    with open("/tmp/a.txt", "r") as fp:
        msg = email.parser.Parser().parse(fp) # does not throw exception
        print(msg) # => &&&&&
        msg['from'] # => None

It is just you can not get useful information, such as msg['to'].
History
Date User Action Args
2014-05-31 16:50:26vajraskysetrecipients: + vajrasky, barry, r.david.murray, serhiy.storchaka, Łukasz.Kucharski
2014-05-31 16:50:26vajraskysetmessageid: <1401555026.67.0.493104497867.issue21476@psf.upfronthosting.co.za>
2014-05-31 16:50:26vajraskylinkissue21476 messages
2014-05-31 16:50:26vajraskycreate