[Zope3-checkins] CVS: Zope3/src/zope/configuration -
config.py:1.9.4.2
Jim Fulton
jim at zope.com
Wed Sep 10 19:08:20 EDT 2003
Update of /cvs-repository/Zope3/src/zope/configuration
In directory cvs.zope.org:/tmp/cvs-serv4240/src/zope/configuration
Modified Files:
Tag: parentgeddon-branch
config.py
Log Message:
got more tests to pass
=== Zope3/src/zope/configuration/config.py 1.9.4.1 => 1.9.4.2 ===
--- Zope3/src/zope/configuration/config.py:1.9.4.1 Mon Sep 8 14:21:55 2003
+++ Zope3/src/zope/configuration/config.py Wed Sep 10 18:08:19 2003
@@ -174,9 +174,20 @@
try:
return __import__(mname+'.'+oname, *_import_chickens)
except ImportError:
- if sys.exc_info()[2].tb_next is not None:
- # There is more than one entry in the chain, so
- # reraise the error:
+
+ # We need to try to figure out what module the import
+ # error is complaining about. If the import failed
+ # due to a failure to import some other module
+ # imported by the module we are importing, we want to
+ # know it. Unfortunately, the value of the import
+ # error is just a string error message. :( We can't
+ # pull it apart directly to see what module couldn't
+ # be imported. The only thing we can really do is to
+ # try to "screen scrape" the error message:
+
+ if str(sys.exc_info()[1]).find(oname) < 0:
+ # There seems to have been an error further down,
+ # so reraise the exception so as not to hide it.
raise
raise ConfigurationError("Module %s has no global %s"
More information about the Zope3-Checkins
mailing list