From f18bef9126ec08286d0c644ec733d7c33438206e Mon Sep 17 00:00:00 2001 From: Joshua Boverhof Date: Sun, 11 Apr 2004 22:01:42 +0000 Subject: [PATCH] ---------------------------------------------------------------------- Modified Files: Utility.py -- Fix to DOM singleton hasAttr method. _attr and _attrNS are instance variables of the minidom Element, and are implementation specific. Now hasAttr method will work when using FtNode.Element, which is what ZSI ParsedSoap defaults to (Ft.Doc). ---------------------------------------------------------------------- --- Utility.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Utility.py b/Utility.py index c593c0e..deda60c 100755 --- a/Utility.py +++ b/Utility.py @@ -394,13 +394,10 @@ class DOM: optional nsuri. If nsuri is not specified, returns true if an attribute exists with the given name with any namespace.""" if nsuri is None: - if node._attrs.has_key(name): - return 1 - for item in node._attrsNS.keys(): - if item[1] == name: - return 1 - return 0 - return node._attrsNS.has_key((nsuri, name)) + if node.hasAttribute(name): + return True + return False + return node.hasAttributeNS(nsuri, name) def getAttr(self, node, name, nsuri=None, default=join): """Return the value of the attribute named 'name' with the