Merge lp:~jcsackett/launchpad/too-many-findAP-methods into lp:launchpad

Proposed by j.c.sackett
Status: Merged
Approved by: j.c.sackett
Approved revision: no longer in the source branch.
Merged at revision: 15978
Proposed branch: lp:~jcsackett/launchpad/too-many-findAP-methods
Merge into: lp:launchpad
Diff against target: 17 lines (+0/-7)
1 file modified
lib/lp/registry/model/accesspolicy.py (+0/-7)
To merge this branch: bzr merge lp:~jcsackett/launchpad/too-many-findAP-methods
Reviewer Review Type Date Requested Status
Richard Harding (community) Approve
Review via email: mp+125011@code.launchpad.net

Commit message

Removes redundant and unused method for finding accesspolicies.

Description of the change

Summary
=======
There is a redundant and unused method, `AccessPolicy.findByPillarAndGrantee`.
It is exactly the same as `AccessPolicy.findByPillar`

Implementation
==============
The redundant method isn't used anywhere and isn't defined on the interface.
It has been deleted.

Tests
=====
bin/test -vvct access

QA
==
None; this method had no callsites.

LoC
===
This only removes code.

Lint
====

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/model/accesspolicy.py

To post a comment you must log in.
Revision history for this message
Richard Harding (rharding) wrote :

Awesome cleanup.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/model/accesspolicy.py'
2--- lib/lp/registry/model/accesspolicy.py 2012-09-11 14:06:21 +0000
3+++ lib/lp/registry/model/accesspolicy.py 2012-09-18 18:24:25 +0000
4@@ -264,13 +264,6 @@
5 Or(*(cls.person == team for team in teams)))
6
7 @classmethod
8- def findByPillarAndGrantee(cls, pillars):
9- """See `IAccessPolicySource`."""
10- return IStore(cls).find(
11- cls,
12- Or(*(cls._constraintForPillar(pillar) for pillar in pillars)))
13-
14- @classmethod
15 def delete(cls, pillars_and_types):
16 """See `IAccessPolicySource`."""
17 cls.find(pillars_and_types).remove()