[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - include.py:1.40

Fred L. Drake, Jr. fred at zope.com
Tue May 11 01:04:57 EDT 2004


Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv8372

Modified Files:
	include.py 
Log Message:
put more information in the InclusionSpecificationError message; this
was helpful in debugging the error using the Specification objects out
of context in Component.__init__().


=== Packages/zpkgtools/zpkgtools/include.py 1.39 => 1.40 ===
--- Packages/zpkgtools/zpkgtools/include.py:1.39	Tue May  4 16:10:28 2004
+++ Packages/zpkgtools/zpkgtools/include.py	Tue May 11 01:04:56 2004
@@ -67,6 +67,15 @@
         self.filename = filename
         self.lineno = lineno
 
+    def __str__(self):
+        s = InclusionError.__str__(self)
+        if self.filename:
+            s = "%s\n(in %s" % (s, self.filename)
+            if self.lineno is not None:
+                s = "%s, line %d" % (s, self.lineno)
+            s += ")"
+        return s
+
 
 def load(sourcedir, url=None):
     """Return the specifications for populating the distribution and




More information about the Zope-CVS mailing list