[Zope-CMF] Re: [CMF-checkins] CVS: Products/CMFDefault -
DublinCore.py:1.43
Florent Guillaume
fg at nuxeo.com
Tue Apr 26 14:16:44 EDT 2005
Yvo Schubbe <zope-cmf at zope.org> wrote:
> - 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'
You're now returning 'Unknown' if the Title() is empty, is that an
intended side effect ?
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope-CMF
mailing list