summaryrefslogtreecommitdiff
path: root/src/saml2/pack.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/saml2/pack.py')
-rw-r--r--src/saml2/pack.py20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/saml2/pack.py b/src/saml2/pack.py
index 4a081ed1..0e6923df 100644
--- a/src/saml2/pack.py
+++ b/src/saml2/pack.py
@@ -18,6 +18,9 @@ except Exception:
import logging
from urllib.parse import urlencode
from urllib.parse import urlparse
+from xml.etree import ElementTree as ElementTree
+
+import defusedxml.ElementTree
import saml2
from saml2.s_utils import deflate_and_base64_encode
@@ -26,23 +29,6 @@ from saml2.sigver import RESP_ORDER
from saml2.xmldsig import SIG_ALLOWED_ALG
-try:
- from xml.etree import ElementTree as ElementTree
-
- if ElementTree.VERSION < "1.3.0":
- # cElementTree has no support for register_namespace
- # neither _namespace_map, thus we sacrify performance
- # for correctness
- from xml.etree import ElementTree
-except ImportError:
- try:
- import cElementTree as ElementTree
- except ImportError:
- from elementtree import ElementTree
-
-import defusedxml.ElementTree
-
-
logger = logging.getLogger(__name__)
NAMESPACE = "http://schemas.xmlsoap.org/soap/envelope/"