From 53b9f00f073e0e3d96c80062fcd8da270081e273 Mon Sep 17 00:00:00 2001 From: Keith Jackson Date: Fri, 23 May 2003 02:31:55 +0000 Subject: [PATCH] Running pychecker over ZSI, and I noticed some problems in wstools. I fixed that fact that Notation and Entity were not be found. I changed them to use the qualified name like the rest of the symbols from xml.dom.minidom. I also discovered that a RecursionError was being thrown, but RecursionError didn't exist. I created simple sub-class of Exception to rectify this. --- Utility.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Utility.py b/Utility.py index 384ca6b..bad8210 100755 --- a/Utility.py +++ b/Utility.py @@ -19,6 +19,11 @@ from TimeoutSocket import TimeoutSocket, TimeoutError from StringIO import StringIO from urlparse import urlparse from httplib import HTTPConnection, HTTPSConnection +from exceptions import Exception + +class RecursionError(Exception): + """Used to indicate a HTTP redirect recursion.""" + pass class HTTPResponse: """Captures the information in an HTTP response message.""" @@ -724,13 +729,13 @@ if 1: clone.entities._seq = [] clone.notations._seq = [] for n in node.notations._seq: - notation = Notation(n.nodeName, n.publicId, n.systemId) + notation = xml.dom.minidom.Notation(n.nodeName, n.publicId, n.systemId) notation.ownerDocument = newOwnerDocument clone.notations._seq.append(notation) if hasattr(n, '_call_user_data_handler'): n._call_user_data_handler(operation, n, notation) for e in node.entities._seq: - entity = Entity(e.nodeName, e.publicId, e.systemId, + entity = xml.dom.minidom.Entity(e.nodeName, e.publicId, e.systemId, e.notationName) entity.actualEncoding = e.actualEncoding entity.encoding = e.encoding