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 loewis
Recipients BreamoreBoy, Steven.Hartland, loewis, pitrou, serhiy.storchaka, vstinner
Date 2013-05-22.15:02:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369234979.38.0.959255092757.issue7727@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy: The patch fixes the OP's concern, but not the extended concern about producing ill-formed XML (at least not for 2.7). If the string contains non-UTF-8 data, yet the XML declaration says UTF-8, it's still ill-formed, and not caught by your patch.

I wonder whether xmlrpclib.Error would be a better exception than ValueError (although ValueError is also plausible); either way, the case should be documented.
History
Date User Action Args
2013-05-22 15:02:59loewissetrecipients: + loewis, pitrou, vstinner, Steven.Hartland, BreamoreBoy, serhiy.storchaka
2013-05-22 15:02:59loewissetmessageid: <1369234979.38.0.959255092757.issue7727@psf.upfronthosting.co.za>
2013-05-22 15:02:59loewislinkissue7727 messages
2013-05-22 15:02:59loewiscreate