more Pythonic formulation for boolean check on list

This commit is contained in:
Helmut Merz 2013-07-01 14:01:38 +02:00
parent 7cfb805971
commit 66c26e77cd

View file

@ -81,7 +81,7 @@ class MemberRegistrationManager(object):
(self.default_principalfolder,))[0]
self.createPrincipal(pfName, userId, password, lastName, firstName,
useExisting=useExisting)
if len(groups)==0:
if not groups:
groups = options(self.groups_key, ())
self.setGroupsForPrincipal(pfName, userId, groups=groups)
return self.createPersonForPrincipal(pfName, userId, lastName, firstName,