DynamicGroupsPlugin.enumerateGroups raises KeyError unnecessarily

Bug #585365 reported by rafaelb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope PAS
Fix Released
Undecided
Tres Seaver

Bug Description

When DynamicGroupsPlugin.enumerateGroups is called with args like: "plugin.enumerateGroups(id="some_id", exact_match=True)" it raises KeyError if "some_id" is not an existent group ID. I believe it is incorrect. In this case the method should return an empty sequence.

This is easy to fix, we just have to check whether the given ID corresponds to an existing group before calling "getGroupInfo". I've attached a patch.

Revision history for this message
rafaelb (rafaelbco) wrote :
Revision history for this message
Tres Seaver (tseaver) wrote :

Fix now committed on the PAS trunk for the 1.7.1 release.

Changed in zope-pas:
assignee: nobody → Tres Seaver (tseaver)
status: New → Fix Committed
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope-pas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.