[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - cfgparser.py:1.8
Fred L. Drake, Jr.
fred at zope.com
Mon May 17 14:28:18 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv12556
Modified Files:
cfgparser.py
Log Message:
add a helpful __str__() to ConfigurationError
=== Packages/zpkgtools/zpkgtools/cfgparser.py 1.7 => 1.8 ===
--- Packages/zpkgtools/zpkgtools/cfgparser.py:1.7 Tue May 11 15:19:18 2004
+++ Packages/zpkgtools/zpkgtools/cfgparser.py Mon May 17 14:28:17 2004
@@ -53,6 +53,15 @@
self.url = url
self.lineno = lineno
+ def __str__(self):
+ s = Exception.__str__(self)
+ if self.url:
+ s = "%s\n(%s" % (s, self.url)
+ if self.lineno is not None:
+ s = "%s, line %s" % (s, self.lineno)
+ s += ")"
+ return s
+
class Schema:
"""Schema definition that can be used by the Parser class to
More information about the Zope-CVS
mailing list