[Python-checkins] r56544 - tracker/instances/python-dev-spambayes-integration/detectors/userauditor.py

erik.forsberg python-checkins at python.org
Wed Jul 25 18:30:41 CEST 2007


Author: erik.forsberg
Date: Wed Jul 25 18:30:40 2007
New Revision: 56544

Modified:
   tracker/instances/python-dev-spambayes-integration/detectors/userauditor.py
Log:

Fix the userauditor role check.


Modified: tracker/instances/python-dev-spambayes-integration/detectors/userauditor.py
==============================================================================
--- tracker/instances/python-dev-spambayes-integration/detectors/userauditor.py	(original)
+++ tracker/instances/python-dev-spambayes-integration/detectors/userauditor.py	Wed Jul 25 18:30:40 2007
@@ -36,7 +36,7 @@
                 raise ValueError, 'Role "%s" does not exist'%rolename
 
         if None != nodeid and "admin" in roles:
-            if not "admin" in [x.lower().strip() for x in cl.get(nodeid, 'roles')]:
+            if not "admin" in [x.lower().strip() for x in cl.get(nodeid, 'roles').split(",")]:
                 raise ValueError, "Only Admins may assign the Admin role!"
 
 


More information about the Python-checkins mailing list