[Zope-Checkins] CVS: Packages/Zope/Startup - datatypes.py:1.6.2.8
Andreas Jung
andreas at andreas-jung.com
Fri Apr 29 06:29:09 EDT 2005
Update of /cvs-repository/Packages/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv29024/lib/python/Zope/Startup
Modified Files:
Tag: Zope-2_7-branch
datatypes.py
Log Message:
- Collector #1751: Improved error reporting reporting during the
startup phase
=== Packages/Zope/Startup/datatypes.py 1.6.2.7 => 1.6.2.8 ===
--- Packages/Zope/Startup/datatypes.py:1.6.2.7 Sat Dec 20 12:47:24 2003
+++ Packages/Zope/Startup/datatypes.py Fri Apr 29 06:29:09 2005
@@ -106,8 +106,11 @@
package = __import__(n, g, g, component)
return package
except ImportError:
- raise ValueError, (
- 'The object named by "%s" could not be imported' % name )
+ import traceback, cStringIO
+ IO = cStringIO.StringIO()
+ traceback.print_exc(file=IO)
+ raise ValueError(
+ 'The object named by "%s" could not be imported\n%s' % (name, IO.getvalue()))
# A datatype that ensures that a dotted path name can be resolved but
# returns the name instead of the object
More information about the Zope-Checkins
mailing list