summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cherrypy/_cptools.py8
-rwxr-xr-xsetup.py1
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)
diff --git a/setup.py b/setup.py
index df6630c7..9ea5bd5c 100755
--- a/setup.py
+++ b/setup.py
@@ -58,6 +58,7 @@ install_requires = [
'cheroot>=5.9.1',
'portend>=2.1.1',
'jaraco.classes',
+ 'jaraco.collections',
]
extras_require = {