From 2dc38ce516a5f0f54e2d011e7e305811beb44d26 Mon Sep 17 00:00:00 2001 From: Tres Seaver <tseaver@palladion.com> Date: Mon, 05 Jun 2017 23:18:05 +0200 Subject: [PATCH] Ensure that instances of 'AllPermissionsList' are iterable. --- pyramid/security.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/pyramid/security.py b/pyramid/security.py index 82e6b73..035f09f 100644 --- a/pyramid/security.py +++ b/pyramid/security.py @@ -21,10 +21,13 @@ class AllPermissionsList(object): """ Stand in 'permission list' to represent all permissions """ + def __iter__(self): - return () + return iter(()) + def __contains__(self, other): return True + def __eq__(self, other): return isinstance(other, self.__class__) -- Gitblit v1.9.3