| @@ -9,10 +9,7 @@ import string | |||||
| import xml.sax | import xml.sax | ||||
| from wstools.XMLname import fromXMLname | from wstools.XMLname import fromXMLname | ||||
| import collections | import collections | ||||
| try: | |||||
| from io import StringIO | |||||
| except ImportError: | |||||
| from io import StringIO | |||||
| from io import StringIO, BytesIO | |||||
| try: from M2Crypto import SSL | try: from M2Crypto import SSL | ||||
| except: pass | except: pass | ||||
| @@ -1050,7 +1047,7 @@ class EmptyEntityResolver(xml.sax.handler.EntityResolver): | |||||
| def _parseSOAP(xml_str, rules = None, ignore_ext=None, | def _parseSOAP(xml_str, rules = None, ignore_ext=None, | ||||
| forbid_entities=False, forbid_external=True, forbid_dtd=False): | forbid_entities=False, forbid_external=True, forbid_dtd=False): | ||||
| inpsrc = xml.sax.xmlreader.InputSource() | inpsrc = xml.sax.xmlreader.InputSource() | ||||
| inpsrc.setByteStream(StringIO(xml_str)) | |||||
| inpsrc.setByteStream(BytesIO(xml_str)) | |||||
| if ignore_ext is None: | if ignore_ext is None: | ||||
| ignore_ext = False | ignore_ext = False | ||||