summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-08-17 13:29:43 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-08-17 13:29:43 -0400
commit25e8037be2aa98f189193da36f6aac4c9775c15a (patch)
tree9c24242e14b9a6e30614603f85bc49e5911234c4
parentcb81bf9bdd46b65afbe70ef5efcbb63a408b661f (diff)
downloadcherrypy-git-25e8037be2aa98f189193da36f6aac4c9775c15a.tar.gz
Let Python Syntax handle the TypeError.
-rw-r--r--cherrypy/_cpconfig.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/cherrypy/_cpconfig.py b/cherrypy/_cpconfig.py
index a003ce69..edd84cf3 100644
--- a/cherrypy/_cpconfig.py
+++ b/cherrypy/_cpconfig.py
@@ -164,13 +164,8 @@ class Config(reprconf.Config):
super(Config, self)._apply(config)
@staticmethod
- def __call__(*args, **kwargs):
+ def __call__(**kwargs):
"""Decorate for page handlers to set _cp_config."""
- if args:
- raise TypeError(
- 'The cherrypy.config decorator does not accept positional '
- 'arguments; you must use keyword arguments.')
-
def tool_decorator(f):
_Vars(f).setdefault('_cp_config', {}).update(kwargs)
return f