[XML-SIG] [ pyxml-Bugs-543138 ] locator in xmlproc utils.py ErrorPrinter

noreply@sourceforge.net noreply@sourceforge.net
Fri, 12 Apr 2002 11:32:11 -0700


Bugs item #543138, was opened at 2002-04-12 14:32
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=543138&group_id=6473

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert Roy (rjroy)
Assigned to: Nobody/Anonymous (nobody)
Summary: locator in xmlproc utils.py ErrorPrinter

Initial Comment:
In xmlproc utils.py ver 1.4
The method __get_location of class ErrorPrinter will 
raise an exception if called. 

AttributeError: ErrorPrinter instance has no 
attribute 'locator'

I browsed the CVS tree and found that the attribute 
locator existed until version 1.3. 

All instantiations of ErrorPrinter in xmlproc pass the 
parser object as a locator. 

Here is a context diff with a proposed fix.


#######################

*** utils.py    Fri Apr 12 14:14:40 2002
--- utils.py.bak        Fri Apr 12 14:06:52 2002
***************
*** 23,29 ****
      """An error handler that prints out warning 
messages."""

      def __init__(self, locator, level = 0, out = 
sys.stderr):
!         xmlapp.ErrorHandler.__init__(self, locator)
          self.level = level
          self.out = out

--- 23,29 ----
      """An error handler that prints out warning 
messages."""

      def __init__(self, locator, level = 0, out = 
sys.stderr):
!         self.locator = locator
          self.level = level
          self.out = out





----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=543138&group_id=6473