This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _mboxMMDF#get_message should delegate to get_bytes
Type: enhancement Stage:
Components: email Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, bpoaugust, r.david.murray
Priority: normal Keywords:

Created on 2016-12-10 17:35 by bpoaugust, last changed 2022-04-11 14:58 by admin.

Messages (2)
msg282863 - (view) Author: (bpoaugust) Date: 2016-12-10 17:35
At present both _mboxMMDF#get_message and get_bytes read the file directly.

However the code in get_bytes duplicates some of the code in get_message. get_message should be recoded to use get_bytes.

It would then be possible to override get_bytes (which is also used by get_string) in order to transform the input stream e.g. to unmangle '>From ' lines.

But in any case it makes sense to reuse the code - DRY
msg282896 - (view) Author: (bpoaugust) Date: 2016-12-11 03:00
On further investigation it sppears that overriding the get_bytes function does not help with unmangling >From.
However it would still be worth re-using the code.
History
Date User Action Args
2022-04-11 14:58:40adminsetgithub: 73120
2016-12-11 03:00:15bpoaugustsetmessages: + msg282896
2016-12-10 17:35:36bpoaugustcreate