Message230932
It depends on encoded part in the header, what email.header.decode_header() returns.
If the header has both raw part and encoded part, the function returns (bytes, None) for the raw part. But if the header has only raw part, the function returns (str, None) for it.
>>> import email.header
>>>
>>> s = 'abc=?koi8-r?q?\xc1\xc2\xd7?='
>>> email.header.decode_header(s)
[(b'abc', None), (b'\xc1\xc2\xd7', 'koi8-r')]
>>>
>>> s = 'abc'
>>> email.header.decode_header(s)
[('abc', None)]
>>>
There should be (bytes, None) for both cases. |
|
Date |
User |
Action |
Args |
2014-11-10 02:42:41 | py.user | set | recipients:
+ py.user, barry, r.david.murray |
2014-11-10 02:42:40 | py.user | set | messageid: <1415587360.95.0.777626227555.issue22833@psf.upfronthosting.co.za> |
2014-11-10 02:42:40 | py.user | link | issue22833 messages |
2014-11-10 02:42:40 | py.user | create | |
|