From 0b8112fda1c37f48ec6a9920ccf9a8608f299db6 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 18 Apr 2013 15:31:40 +0200 Subject: [PATCH] Pep8. --- plone/app/discussion/browser/conversation.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plone/app/discussion/browser/conversation.py b/plone/app/discussion/browser/conversation.py index d618e05..3e05416 100644 --- a/plone/app/discussion/browser/conversation.py +++ b/plone/app/discussion/browser/conversation.py @@ -64,8 +64,9 @@ class ConversationView(object): return False # Always return False if object is a folder - if (IFolderish.providedBy(context) and - not INonStructuralFolder.providedBy(context)): + context_is_folderish = IFolderish.providedBy(context) + context_is_structural = not INonStructuralFolder.providedBy(context) + if (context_is_folderish and context_is_structural): return False def traverse_parents(context): @@ -73,8 +74,9 @@ class ConversationView(object): # enabled in a parent folder. for obj in aq_chain(context): if not IPloneSiteRoot.providedBy(obj): - if (IFolderish.providedBy(obj) and - not INonStructuralFolder.providedBy(obj)): + obj_is_folderish = IFolderish.providedBy(obj) + obj_is_stuctural = not INonStructuralFolder.providedBy(obj) + if (obj_is_folderish and obj_is_stuctural): flag = getattr(obj, 'allow_discussion', None) if flag is not None: return flag