[CMF-checkins] CVS: Products/CMFCore - TypesTool.py:1.25
Tres Seaver
tseaver@zope.com
Thu, 29 Nov 2001 18:19:28 -0500
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv22441
Modified Files:
TypesTool.py
Log Message:
- Minor formatting cleanup.
- Add tests for type information objects (to support addition
of ID-generation, per tracker #357).
=== Products/CMFCore/TypesTool.py 1.24 => 1.25 ===
"""
for action in self.getActions():
+
if action.has_key('id'):
if action['id'] == id:
return action['action']
@@ -193,8 +194,11 @@
# Temporary backward compatibility.
if string.lower(action['name']) == id:
return action['action']
+
if default is _marker:
- raise TypeError, 'No action "%s" for type "%s"' % ( id, self.getId() )
+ raise TypeError, ( 'No action "%s" for type "%s"'
+ % ( id, self.getId() )
+ )
else:
return default