From 82c3ddec3e7aa3bb91344fae26131e6707e57ecb Mon Sep 17 00:00:00 2001 From: Toby Burress Date: Sun, 10 Feb 2013 02:01:56 -0500 Subject: [PATCH] Patch the sax parser for python3 strings. --- boto/connection.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/boto/connection.py b/boto/connection.py index 15ee461487..963582c07b 100644 --- a/boto/connection.py +++ b/boto/connection.py @@ -95,6 +95,14 @@ DEFAULT_CA_CERTS_FILE = os.path.join(os.path.dirname(os.path.abspath(boto.cacerts.__file__ )), "cacerts.txt") +# sigh +# monkeypatch xml.sax.parseString +def ps(*args, **kwargs): + args = list(args) + args[0] = boto.utils.ensure_bytes(args[0]) + xml.sax._parseString(*args, **kwargs) +xml.sax._parseString = xml.sax.parseString +xml.sax.parseString = ps class HostConnectionPool(object):