Tres Seaver wrote:
Chris, you need to get off this hobby horse. Florent's fix was correct for the *new* model which has 'getObject' raising (a model you profess to *like*).
Why not by catching the expected errors? Do you like bare try: except:'s? (since that's effectively what this is!)
Bugs in the catalog itself, in BTrees, in the CMF, or in third-party software can leave cruft in the catalog: robust code *has* to deal with that problem.
...by sweeping it under the carpet? Come on! I for one want to know if there's cruft in my catalog so I can fix it.
Now, this particular case seems to back up my point even more. It looks like the actual problem here is crufty code in Products.CMFDefault.DiscussionItem which has been happilly masked up until now.
This "return None" culture seems to be a similar hobby horse. That said, we still have the bizarre __allow_access_to_unprotected_subobjects__ in SimpleItem, so I guess I shouldn't really be suprised, should I?
Chris - this is more like it, I shouldn't be agreeing with Tres ;-)
-- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk _______________________________________________ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests