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.

Author gstarck
Recipients boom0192, gstarck
Date 2021-02-07.18:09:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612721390.57.0.212311416854.issue43125@roundup.psfhosted.org>
In-reply-to
Content
problem seems to/could be in /usr/lib/python3.8/email/base64mime.py


```
def body_encode(s, maxlinelen=76, eol=NL):
    r"""Encode a string with base64.

    Each line will be wrapped at, at most, maxlinelen characters (defaults to
    76 characters).

    Each line of encoded text will end with eol, which defaults to "\n".  Set
    this to "\r\n" if you will be using the result of this function directly
    in an email.
    """
    if not s:
        return s
```

If function is supposed to return str for any bytes input, then there it is returning the original bytes instance.. which is the trouble. it should return `""` and that's it ?
 
I would like to work/contribute on this issue.. I'll further investigate this issue and possible solution and comes with a patch rather sooner than later..
History
Date User Action Args
2021-02-07 18:09:50gstarcksetrecipients: + gstarck, boom0192
2021-02-07 18:09:50gstarcksetmessageid: <1612721390.57.0.212311416854.issue43125@roundup.psfhosted.org>
2021-02-07 18:09:50gstarcklinkissue43125 messages
2021-02-07 18:09:50gstarckcreate