[Zope3-checkins] CVS: Zope3/src/zope/configuration - config.py:1.22
Tim Peters
tim.one at comcast.net
Mon Mar 8 18:39:02 EST 2004
Update of /cvs-repository/Zope3/src/zope/configuration
In directory cvs.zope.org:/tmp/cvs-serv5905/src/zope/configuration
Modified Files:
config.py
Log Message:
checkDuplicate(): Squashed a Unix assumption in the test.
=== Zope3/src/zope/configuration/config.py 1.21 => 1.22 ===
--- Zope3/src/zope/configuration/config.py:1.21 Mon Mar 8 12:26:59 2004
+++ Zope3/src/zope/configuration/config.py Mon Mar 8 18:39:00 2004
@@ -189,7 +189,7 @@
try:
return __import__(mname+'.'+oname, *_import_chickens)
except ImportError:
-
+
# 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
@@ -259,10 +259,12 @@
>>> c = ConfigurationContext()
>>> c.checkDuplicate('/foo.zcml')
- >>> c.checkDuplicate('/foo.zcml')
- Traceback (most recent call last):
- ...
- ConfigurationError: '/foo.zcml' included more than once
+ >>> try:
+ ... c.checkDuplicate('/foo.zcml')
+ ... except ConfigurationError, e:
+ ... # On Linux the exact msg has /foo, on Windows \foo.
+ ... str(e).endswith("foo.zcml' included more than once")
+ True
You may use different ways to refer to the same file:
@@ -740,7 +742,7 @@
>>> item.finish()
Then before will be when we call finish:
-
+
>>> pprint(context.actions)
[(('before', 1, 2), f), ('after', f)]
More information about the Zope3-Checkins
mailing list