Skip to content

Commit

Permalink
fix GroupDataError
Browse files Browse the repository at this point in the history
  • Loading branch information
pbauer committed Mar 19, 2018
1 parent 2bfea8b commit 0f8cc56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Products/PlonePAS/tools/groupdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
_marker = object()


class GroupDataError(Exception):
pass


@implementer(IGroupDataTool)
class GroupDataTool(UniqueObject, SimpleItem, PropertyManager):
"""This tool wraps group objects, allowing transparent access to
Expand Down Expand Up @@ -132,7 +136,7 @@ def getGroup(self):
bcontext = aq_base(parent)
bcontainer = aq_base(aq_parent(aq_inner(self)))
if bcontext is bcontainer or not hasattr(bcontext, 'getUserName'):
raise 'GroupDataError'("Can't find group data")
raise GroupDataError("Can't find group data")
# Return the user object, which is our context.
return parent

Expand Down

0 comments on commit 0f8cc56

Please sign in to comment.