diff --git a/wstools/WSDLTools.py b/wstools/WSDLTools.py index 61136c5..c341178 100644 --- a/wstools/WSDLTools.py +++ b/wstools/WSDLTools.py @@ -10,7 +10,11 @@ ident = "$Id$" import weakref -from cStringIO import StringIO +try: + from io import StringIO +except ImportError: + from cStringIO import StringIO + from Namespaces import OASIS, XMLNS, WSA, WSA_LIST, WSAW_LIST, WSRF_V1_2, WSRF from Utility import Collection, CollectionNS, DOM, ElementProxy, basejoin from XMLSchema import XMLSchema, SchemaReader, WSDLToolsAdapter diff --git a/wstools/c14n.py b/wstools/c14n.py index f88160d..462fc4c 100644 --- a/wstools/c14n.py +++ b/wstools/c14n.py @@ -56,7 +56,10 @@ except: BASE = "http://www.w3.org/2000/xmlns/" XML = "http://www.w3.org/XML/1998/namespace" -import io +try: + from io import StringIO +except ImportError: + from cStringIO import StringIO _attrs = lambda E: (E.attributes and list(E.attributes.values())) or [] _children = lambda E: E.childNodes or []