summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2015-03-11 16:51:29 -0700
committerSimo Sorce <simo@redhat.com>2015-03-12 15:36:33 -0400
commit22e983978fcbd84896468017dd5bdacf8a18cf3c (patch)
treee0804b30b3c6104569274b60ef9f9e778ac94621
parent078942b2cf6d73697f4c6b8a28cabe940f358532 (diff)
downloadipsilon-master.tar.gz
ipsilon-master.tar.xz
ipsilon-master.zip
Don't explicitly save sessionsHEADmaster
Saving a session causes it to be unlocked, but sessions have a hook that also performs a save just before the session is finalized. In CherryPy 3.3.0 and later, an assertion was added to ensure that a session is locked when trying to perform a save. Since we perform explicit saves in our code, this causes the assertion to be tripped when the hook executes. This patch removes our explicit save calls. We should rely on the hook to save and unlock the session. https://fedorahosted.org/ipsilon/ticket/84 Signed-off-by: Nathan Kinder <nkinder@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
-rw-r--r--ipsilon/util/user.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/ipsilon/util/user.py b/ipsilon/util/user.py
index fd557a0..1ce5c17 100644
--- a/ipsilon/util/user.py
+++ b/ipsilon/util/user.py
@@ -154,7 +154,6 @@ class UserSession(Log):
def save_user_attrs(self, userattrs):
cherrypy.session['userattrs'] = userattrs
- cherrypy.session.save()
self._debug('Saved user attrs')
self.userattrs = userattrs
@@ -171,7 +170,6 @@ class UserSession(Log):
def save_provider_data(self, provider, data):
attr = self._get_provider_attr_name(provider)
cherrypy.session[attr] = data
- cherrypy.session.save()
self._debug('Saved %s provider data' % provider)
def save_data(self, facility, name, data):
@@ -179,7 +177,6 @@ class UserSession(Log):
if facility not in cherrypy.session:
cherrypy.session[facility] = dict()
cherrypy.session[facility][name] = data
- cherrypy.session.save()
self._debug('Saved session data named [%s:%s]' % (facility, name))
def get_data(self, facility, name):
@@ -202,4 +199,3 @@ class UserSession(Log):
else:
del cherrypy.session[facility]
self._debug('Nuked session facility [%s]' % (facility,))
- cherrypy.session.save()