Comment 2 for bug 453203

Revision history for this message
Gavin Panella (allenap) wrote :

There is a problem with the data that's been uploaded by apport I
would guess, though I don't know if it's apport's fault; it may well
not be.

This code that's breaking is:

    if disposition == 'inline':
        assert part_headers.get_content_type() == 'text/plain', (
            "Inline parts have to be plain text.")
        charset = part_headers.get_content_charset()
        assert charset, (
            "A charset has to be specified for text parts.")
        inline_content = part_file.read().rstrip()
        part_file.close()
--> inline_content = inline_content.decode(charset)

The RFC822 data that apport uploaded is being parsed. This part is
declared as text/plain with a charset of "utf8" (seen in the OOPS
report), but inline_content does not contain valid utf8 data. My guess
is that there is binary data in there, and the disposition should have
been 'attachment'.

We need to get one of these blobs, or a repeatable test case.