r252658 - in Products.cooptation/trunk: . Products/cooptation docs

"Vincent Fretin" <svn-changes-z4DKO/[email protected]> Sun, 27 Oct 2013 17:51:12 +0000 (UTC)
Newsgroups gmane.comp.web.zope.plone.collective.cvs
Message-ID <[email protected]>
Author: vincentfretin
Date: Sun Oct 27 17:51:12 2013
New Revision: 252658

Modified:
   Products.cooptation/trunk/Products/cooptation/wfsubscribers.py
   Products.cooptation/trunk/docs/HISTORY.txt
   Products.cooptation/trunk/setup.py
Log:
Fix "UnboundLocalError: local variable 'username' referenced before
assignment" in notifyCooptationToUser.


Modified: Products.cooptation/trunk/Products/cooptation/wfsubscribers.py
==============================================================================
--- Products.cooptation/trunk/Products/cooptation/wfsubscribers.py	(original)
+++ Products.cooptation/trunk/Products/cooptation/wfsubscribers.py	Sun Oct 27 17:51:12 2013
@@ -62,10 +62,10 @@
 def notifyCooptationToUser(obj, actor=None, recipients=None, **kwargs):
     workspace = obj.getWorkspace()
     role = obj.getRole()
+    username = kwargs['username']
     if workspace and role:
         groupname = getattr(workspace, 'getM%sGroup' % obj.getRole())()
         gtool = getToolByName(obj, 'portal_groups')
-        username = kwargs['username']
         gtool.addPrincipalToGroup(username, groupname)
 
     owner = obj.getOwner()

Modified: Products.cooptation/trunk/docs/HISTORY.txt
==============================================================================
--- Products.cooptation/trunk/docs/HISTORY.txt	(original)
+++ Products.cooptation/trunk/docs/HISTORY.txt	Sun Oct 27 17:51:12 2013
@@ -1,10 +1,19 @@
 Changelog
 =========
 
+1.4.3 (unreleased)
+------------------
+
+- Fix "UnboundLocalError: local variable 'username' referenced before
+  assignment" in notifyCooptationToUser.
+  [vincentfretin]
+
+
 1.4.2 (2013-09-25)
 ------------------
 
 - Don't send password in the mail but a link to choose the password.
+  [vincentfretin]
 
 
 1.4.1 (2013-04-01)

Modified: Products.cooptation/trunk/setup.py
==============================================================================
--- Products.cooptation/trunk/setup.py	(original)
+++ Products.cooptation/trunk/setup.py	Sun Oct 27 17:51:12 2013
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 import os
 
-version = '1.4.2'
+version = '1.4.3.dev0'
 
 setup(name='Products.cooptation',
       version=version,

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk