From 5f5b8319049e22bef715d1172f54a5adbd57f195 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 28 Aug 2010 16:08:36 +0000 Subject: [PATCH] Be more specific, use ImportError. svn path=/plone.app.discussion/trunk/; revision=39270 --- plone/app/discussion/conversation.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/conversation.py b/plone/app/discussion/conversation.py index f3dc1f8..d38b38f 100644 --- a/plone/app/discussion/conversation.py +++ b/plone/app/discussion/conversation.py @@ -42,7 +42,7 @@ try: # Plone 4 from zope.lifecycleevent import ObjectAddedEvent from zope.lifecycleevent import ObjectRemovedEvent -except: +except ImportError: # Plone 3.x from zope.app.container.contained import ObjectAddedEvent from zope.app.container.contained import ObjectRemovedEvent @@ -64,6 +64,7 @@ from plone.app.discussion.comment import Comment ANNOTATION_KEY = 'plone.app.discussion:conversation' + class Conversation(Traversable, Persistent, Explicit): """A conversation is a container for all comments on a content object. @@ -484,4 +485,6 @@ class CommentReplies(ConversationReplies): comment.in_reply_to = self.comment_id return self.conversation.addComment(comment) - # Dict API is inherited, written in terms of self.conversation and self.children + # Dict API is inherited, written in terms of self.conversation and + # self.children +