]> git.ipfire.org Git - thirdparty/patchwork.git/commit
parser: fix parsing of messages with empty subjects
authorDaniel Axtens <dja@axtens.net>
Fri, 7 Jul 2017 14:24:46 +0000 (00:24 +1000)
committerStephen Finucane <stephen@that.guru>
Wed, 12 Jul 2017 08:31:16 +0000 (09:31 +0100)
commitae6cd3bcc76c34b9f449319a7de8859ba4705ca9
tree7337d928986b22852e2b127e3b5b615217bff5b4
parent18a2b98ac39f6c3fb670ac09d4576d59bf8fe5ac
parser: fix parsing of messages with empty subjects

The fuzz fixups made the test too strict ("if not subject" rather than
"if subject is None") in an attempt to catch broken subject headers.
This broke parsing of messages with an empty subject.

Fix it and add a test.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/parser.py
patchwork/tests/mail/0016-no-subject.mbox [new file with mode: 0644]
patchwork/tests/test_parser.py