[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - cfgparser.py:1.3
Fred L. Drake, Jr.
fred at zope.com
Mon Apr 19 10:26:52 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv21768
Modified Files:
cfgparser.py
Log Message:
make sure we set the lineno attribute of the ConfigurationError
objects, since they may have been raised by an alternate schema
implementation without access to the line number information
=== Packages/zpkgtools/zpkgtools/cfgparser.py 1.2 => 1.3 ===
--- Packages/zpkgtools/zpkgtools/cfgparser.py:1.2 Fri Apr 2 01:30:05 2004
+++ Packages/zpkgtools/zpkgtools/cfgparser.py Mon Apr 19 10:26:51 2004
@@ -246,7 +246,11 @@
value = self.replace(value)
else:
value = ''
- self.schema.addValue(section, key, value)
+ try:
+ self.schema.addValue(section, key, value)
+ except ConfigurationError, e:
+ e.lineno = self.lineno
+ raise
def replace(self, text):
parts = []
More information about the Zope-CVS
mailing list