Stephen Finucane <[email protected]> writes:

> On 28 Aug 21:10, Daniel Axtens wrote:
>> Daniel Axtens <[email protected]> writes:
>> 
>> 
>> > with open(args[0], 'rb') as file_:
>> >      decoded_mail = file_.read().decode('utf-8')
>> >      mail = email.message_from_string(decoded_mail)
>> >
>> > This is super ugly, but works in Py3. Ironically it doesn't work in Py2,
>> > but it's a start. Could you include something like this in this patch
>> > set? I think the parsearchive will require something similar too.
>> 
>> Looks like there's message_from_bytes and message_from_binary_file in
>> recent versions of 'email' - I haven't tried but I assume that would be
>> better. Anyway, I'll leave it to your judgement.
>> 
>> Regards,
>> Daniel
>
> This is a definite issue, but I think it's outside of the scope of this
> series. Could you open a bug on the issue tracker [1] and we'll resolve
> it in a follow-up?

Fair enough. Will do.

Regards,
Daniel

>
> Stephen
>
> [1] https://github.com/getpatchwork/patchwork/issues
>
>> >
>> > I'm going to start collecting these "interesting" emails to make a test 
>> > suite.
>> >
>> > Regards,
>> > Daniel
>> >
>> > [0] https://lists.ozlabs.org/pipermail/patchwork/2016-August/003158.html

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to