Message187448
The message in both branches of the if talk about empty labels, which is probably my fault since I got the sense of the if wrong in my suggestion. One of them should be about the label being too long. The one that should be the 'empty' message also doesn't read right to my eyes. As I said I think it should be something like: '"empty label in %r" % result.decode()'.
Also, in looking at the module code, there are several other places where the size check and simple message are used. In all of these cases the string has already been confirmed to be (or converted to, in the case of the punycoding) ASCII. So we can abstract this check into a function and call it from all those locations.
Do you want to update the patch accordingly, Mike? It will need more tests. |
|
Date |
User |
Action |
Args |
2013-04-20 18:09:09 | r.david.murray | set | recipients:
+ r.david.murray, loewis, giampaolo.rodola, mmilkin |
2013-04-20 18:09:09 | r.david.murray | set | messageid: <1366481349.32.0.886973209358.issue9682@psf.upfronthosting.co.za> |
2013-04-20 18:09:09 | r.david.murray | link | issue9682 messages |
2013-04-20 18:09:08 | r.david.murray | create | |
|