From af9f2e5fd5664aeaea2057ce1c518fb04617a0f0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 29 Nov 2009 14:52:29 +0000 Subject: - Trying to use an HTTP method name string such as ``GET`` as a ``request_type`` predicate caused a startup time failure when it was encountered in imperative configuration or in a decorator (symptom: ``Type Error: Required specification must be a specification``). This now works again, although ``request_method`` is a more modern predicate. --- repoze/bfg/configuration.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'repoze/bfg/configuration.py') diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py index c37ed2c72..4d7e8dd57 100644 --- a/repoze/bfg/configuration.py +++ b/repoze/bfg/configuration.py @@ -547,6 +547,11 @@ class Configurator(object): raise ConfigurationError('"view" was not specified and ' 'no "renderer" specified') + if request_type in ('GET', 'HEAD', 'PUT', 'POST', 'DELETE'): + # b/w compat for 1.0 + request_method = request_type + request_type = None + if request_type and route_name: raise ConfigurationError( 'A view cannot be configured with both the request_type and ' -- cgit v1.2.3