diff options
author | Tres Seaver <tseaver@palladion.com> | 2013-02-12 16:08:49 -0500 |
---|---|---|
committer | Tres Seaver <tseaver@palladion.com> | 2013-02-12 16:08:49 -0500 |
commit | 0854c830802c483c2e7fae2f8b5d19f82606579b (patch) | |
tree | 41f8243f7b1fb38ec9c355c4ee6893be3ab5d99d | |
parent | 1eb2ad2c3fcfa40512a47e9183df5ea5b5db07a7 (diff) | |
download | zope-security-0854c830802c483c2e7fae2f8b5d19f82606579b.tar.gz |
TIghten 'getTestProxyITems' implementation.
-rw-r--r-- | src/zope/security/proxy.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/zope/security/proxy.py b/src/zope/security/proxy.py index 0298559..eac3563 100644 --- a/src/zope/security/proxy.py +++ b/src/zope/security/proxy.py @@ -31,15 +31,10 @@ removeSecurityProxy = getObject from zope.security.checker import ProxyFactory def getTestProxyItems(proxy): - """Try to get checker names and permissions for testing - - If this succeeds, a sorted sequence of items is returned, - otherwise, None is returned. + """Return a sorted sequence of checker names and permissions for testing """ checker = getChecker(proxy) - items = checker.get_permissions.items() - items.sort() - return items + return sorted(checker.get_permissions.items()) builtin_isinstance = None |