summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2024-01-27 17:03:06 -0700
committerMichael Merickel <michael@merickel.org>2024-01-27 17:03:06 -0700
commit56fad7f1ba9ead433f60210958756c27a1e5d7f3 (patch)
tree5aa909cfab77fbd1ae9a57704b1308710b4729c0 /src
parent44be88382f258430b6bb19c318ed93a72ca677c9 (diff)
downloadpyramid-56fad7f1ba9ead433f60210958756c27a1e5d7f3.tar.gz
pyramid-56fad7f1ba9ead433f60210958756c27a1e5d7f3.tar.bz2
pyramid-56fad7f1ba9ead433f60210958756c27a1e5d7f3.zip
every subscriber predicate must accept only one arg, so codify that
Diffstat (limited to 'src')
-rw-r--r--src/pyramid/config/adapters.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/pyramid/config/adapters.py b/src/pyramid/config/adapters.py
index 312dfe1f9..7a73c17f8 100644
--- a/src/pyramid/config/adapters.py
+++ b/src/pyramid/config/adapters.py
@@ -76,15 +76,8 @@ class AdaptersConfiguratorMixin:
return subscriber
def _derive_predicate(self, predicate):
- if eventonly(predicate):
-
- def derived_predicate(*arg):
- return predicate(arg[0])
-
- # seems pointless to try to fix __doc__, __module__, etc as
- # predicate will invariably be an instance
- else:
- derived_predicate = predicate
+ def derived_predicate(*arg):
+ return predicate(arg[0])
return derived_predicate