summaryrefslogtreecommitdiff
path: root/cherrypy/lib/sessions.py
diff options
context:
space:
mode:
Diffstat (limited to 'cherrypy/lib/sessions.py')
-rw-r--r--cherrypy/lib/sessions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cherrypy/lib/sessions.py b/cherrypy/lib/sessions.py
index 23115c50..42c89d8c 100644
--- a/cherrypy/lib/sessions.py
+++ b/cherrypy/lib/sessions.py
@@ -101,6 +101,7 @@ from cherrypy._cpcompat import copyitems, pickle, random20, unicodestr
from cherrypy.lib import httputil
from cherrypy.lib import lockfile
from cherrypy.lib import locking
+from cherrypy.lib import is_iterator
missing = object()
@@ -778,7 +779,7 @@ def save():
else:
# If the body is not being streamed, we save the data now
# (so we can release the lock).
- if isinstance(response.body, types.GeneratorType):
+ if is_iterator(response.body):
response.collapse_body()
cherrypy.session.save()
save.failsafe = True