Message271607
In my opinion, this is still a clear case of "invalid input, raise an error", but I don't think AssertionError is the right one. Maybe just don't catch the unexpected binascii.Error and let it fly towards the user?
I might go even one step further and just let base64 library handle and raise all the necessary errors here, similarly to how your "encode_b" function works.
If you want more error resilience (meaning: email lib would not crash with invalid inputs), I would think returning an empty string is okay, since that base64 input is clearly not a valid base64 that is going to decode into anything. |
|
Date |
User |
Action |
Args |
2016-07-29 05:55:18 | CryptidVulpes | set | recipients:
+ CryptidVulpes, r.david.murray, Claudiu Saftoiu |
2016-07-29 05:55:18 | CryptidVulpes | set | messageid: <1469771718.04.0.120616976371.issue27397@psf.upfronthosting.co.za> |
2016-07-29 05:55:18 | CryptidVulpes | link | issue27397 messages |
2016-07-29 05:55:17 | CryptidVulpes | create | |
|