diff options
-rw-r--r-- | cherrypy/_cptools.py | 8 | ||||
-rwxr-xr-x | setup.py | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/cherrypy/_cptools.py b/cherrypy/_cptools.py index 92c2b656..e51a963c 100644 --- a/cherrypy/_cptools.py +++ b/cherrypy/_cptools.py @@ -25,6 +25,8 @@ are generally either modules or instances of the tools.Tool class. import sys import warnings +from jaraco.collections import Projection + import cherrypy from cherrypy._helper import expose @@ -323,11 +325,7 @@ class SessionTool(Tool): # Grab cookie-relevant tool args relevant = 'path', 'path_header', 'name', 'timeout', 'domain', 'secure' - conf = dict( - (k, v) - for k, v in self._merged_args().items() - if k in relevant - ) + conf = Projection(relevant, self._merged_args()) _sessions.set_response_cookie(**conf) @@ -58,6 +58,7 @@ install_requires = [ 'cheroot>=5.9.1', 'portend>=2.1.1', 'jaraco.classes', + 'jaraco.collections', ] extras_require = { |