From 0854c830802c483c2e7fae2f8b5d19f82606579b Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 12 Feb 2013 16:08:49 -0500 Subject: TIghten 'getTestProxyITems' implementation. --- src/zope/security/proxy.py | 9 ++------- 1 file 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 -- cgit v1.2.1