[CMF-checkins] CVS: Products/CMFDefault - DublinCore.py:1.43

Yvo Schubbe y.2005- at wcm-solutions.de
Tue Apr 26 10:45:48 EDT 2005


Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv2416/CMFDefault

Modified Files:
	DublinCore.py 
Log Message:
- all portal types have to implement DynamicType, so getTypeInfo always exists
- meta_type might mask a problem, 'Unknown' is a more explicit fallback


=== Products/CMFDefault/DublinCore.py 1.42 => 1.43 ===
--- Products/CMFDefault/DublinCore.py:1.42	Sat Apr  9 18:40:39 2005
+++ Products/CMFDefault/DublinCore.py	Tue Apr 26 10:45:48 2005
@@ -220,11 +220,8 @@
     def Type( self ):
         """ Dublin Core Type element - resource type.
         """
-        if hasattr(aq_base(self), 'getTypeInfo'):
-            ti = self.getTypeInfo()
-            if ti is not None:
-                return ti.Title()
-        return self.meta_type
+        ti = self.getTypeInfo()
+        return ti is not None and ti.Title() or 'Unknown'
 
     security.declareProtected(View, 'Format')
     def Format( self ):



More information about the CMF-checkins mailing list