Be more specific, use ImportError.
svn path=/plone.app.discussion/trunk/; revision=39270
This commit is contained in:
parent
e12d19a6e9
commit
5f5b831904
@ -42,7 +42,7 @@ try:
|
|||||||
# Plone 4
|
# Plone 4
|
||||||
from zope.lifecycleevent import ObjectAddedEvent
|
from zope.lifecycleevent import ObjectAddedEvent
|
||||||
from zope.lifecycleevent import ObjectRemovedEvent
|
from zope.lifecycleevent import ObjectRemovedEvent
|
||||||
except:
|
except ImportError:
|
||||||
# Plone 3.x
|
# Plone 3.x
|
||||||
from zope.app.container.contained import ObjectAddedEvent
|
from zope.app.container.contained import ObjectAddedEvent
|
||||||
from zope.app.container.contained import ObjectRemovedEvent
|
from zope.app.container.contained import ObjectRemovedEvent
|
||||||
@ -64,6 +64,7 @@ from plone.app.discussion.comment import Comment
|
|||||||
|
|
||||||
ANNOTATION_KEY = 'plone.app.discussion:conversation'
|
ANNOTATION_KEY = 'plone.app.discussion:conversation'
|
||||||
|
|
||||||
|
|
||||||
class Conversation(Traversable, Persistent, Explicit):
|
class Conversation(Traversable, Persistent, Explicit):
|
||||||
"""A conversation is a container for all comments on a content object.
|
"""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
|
comment.in_reply_to = self.comment_id
|
||||||
return self.conversation.addComment(comment)
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user