Commit 6b4c3574 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

NoWildcardAcceptPredicate drop useless override of __init__

Follow-up 5182ff4293ee

pyramid.predicates.AcceptPredicate handle both single and multiple values now
https://github.com/Pylons/pyramid/blob/0c29cf2df41600d3906d521c72991c7686018b71/src/pyramid/predicates.py#L138
parent 796714354e9c
......@@ -25,11 +25,6 @@ class NoWildcardAcceptPredicate(predicates.AcceptPredicate):
See https://github.com/Pylons/pyramid/issues/1264.
"""
def __init__(self, val, config):
if not isinstance(val, (list, tuple)):
val = (val, )
super(NoWildcardAcceptPredicate, self).__init__(val, config)
def __call__(self, context, request):
request_accepts = [h for h in request.accept if h != '*/*']
for accept_type in self.values:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment