beaker sessions and local time bug

06.02.2009

if you use beaker sessions in your python application, when you're gonna invalidate the session you may get an internal server error. the problem occurs if you use local settings other than "en_US". beaker can't handle the access_time and logout_time in that situation. the solution i come up with may not be the best idea but it does the job until the bug is fixed. basically what i do is setting the local to en_US in the logout class. here's a simple example.
  class logout(object):
    def GET(self):
      locale.setlocale(locale.LC_ALL, 'en_US')
      session.invalidate()
blog comments powered by Disqus