From 6218ee110903bb9d633729c3a90275fc0a75334f Mon Sep 17 00:00:00 2001 From: Avner Cohen Date: Mon, 27 Jan 2020 19:30:10 +0200 Subject: [PATCH] Fix to avoid random in namespace creation, relevant specifically to python3 --- .gitignore | 15 +++++++++++++++ suds/xsd/sxbase.py | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..fa69bbb1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +build/ +dist/ +.eggs/ +.pytest_cache +.egg-info/ +*.gz +*.zip + +__* +__* + +*.pyc +*.pyo + +*.bak diff --git a/suds/xsd/sxbase.py b/suds/xsd/sxbase.py index 95e98c51..465e175a 100644 --- a/suds/xsd/sxbase.py +++ b/suds/xsd/sxbase.py @@ -179,6 +179,10 @@ def namespace(self, prefix=None): """ ns = self.schema.tns + + if self.ref and self.ref in self.schema.elements.keys(): + ns = self.ref + if ns[0] is None: ns = (prefix, ns[1]) return ns