Ignore:
Timestamp:
Apr 14, 2011 5:26:23 PM (13 years ago)
Author:
kroman0
Message:

Pyflakes and pep8 fixes #3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/utils.py

    r3115 r3116  
    8383        email = obj.getProperty('email', None) 
    8484        if email is None: 
    85             creators = hasattr(obj, 'listCreators') and obj.listCreators() or [obj.Creator(),] 
     85            creators = hasattr(obj, 'listCreators') and obj.listCreators() or \ 
     86                [obj.Creator(), ] 
    8687            userid = creators and creators[0] or "" 
    8788            creator = getToolByName(context, 'portal_membership').getMemberById(userid) 
     
    126127        if user_email: 
    127128            template = 'notify_comment_template' 
    128             args={'mto': user_email, 
    129                   'mfrom': admin_email, 
    130                   'obj': reply_parent, 
    131                   'organization_name': organization_name, 
    132                   'name': creator_name} 
     129            args = {'mto': user_email, 
     130                    'mfrom': admin_email, 
     131                    'obj': reply_parent, 
     132                    'organization_name': organization_name, 
     133                    'name': creator_name} 
    133134        else: 
    134135            args = {} 
     
    141142        if user_email: 
    142143            template = 'rejected_comment_template' 
    143             args={'mto': user_email, 
    144                   'mfrom': admin_email, 
    145                   'obj': reply_parent, 
    146                   'organization_name': organization_name, 
    147                   'name': creator_name} 
     144            args = {'mto': user_email, 
     145                    'mfrom': admin_email, 
     146                    'obj': reply_parent, 
     147                    'organization_name': organization_name, 
     148                    'name': creator_name} 
    148149        else: 
    149150            args = {} 
     
    159160            user_email = getEmail(di_parrent, context) 
    160161            if user_email: 
    161                 args={'mto': user_email, 
    162                       'mfrom': admin_email, 
    163                       'obj': reply_parent, 
    164                       'organization_name': organization_name, 
    165                       'name': di_parrent.getOwnerTuple()[1]} 
     162                args = {'mto': user_email, 
     163                        'mfrom': admin_email, 
     164                        'obj': reply_parent, 
     165                        'organization_name': organization_name, 
     166                        'name': di_parrent.getOwnerTuple()[1]} 
    166167            else: 
    167168                args = {} 
     
    173174        user_email = getParentOwnerEmail(reply, context) 
    174175        if user_email: 
    175             args={'mto':user_email, 
    176                   'mfrom':admin_email, 
    177                   'obj':reply_parent, 
    178                   'organization_name':organization_name} 
     176            args = {'mto': user_email, 
     177                    'mfrom': admin_email, 
     178                    'obj': reply_parent, 
     179                    'organization_name': organization_name} 
    179180            subject = translate(_(u"published_notification_subject", 
    180181                default=u"[${organization_name}] New comment added", 
     
    188189        user_email = getProp(context, "email_discussion_manager", None) 
    189190        if user_email: 
    190             args={'mto':user_email, 
    191                   'mfrom':admin_email, 
    192                   'obj':reply_parent, 
    193                   'organization_name':organization_name} 
     191            args = {'mto': user_email, 
     192                    'mfrom': admin_email, 
     193                    'obj': reply_parent, 
     194                    'organization_name': organization_name} 
    194195            subject = translate(_(u"approve_notification_subject", 
    195196                default=u"[${organization_name}] New comment awaits moderation", 
Note: See TracChangeset for help on using the changeset viewer.