From: Eric R. <th...@er...> - 2004-11-16 21:27:36
|
I've been working on porting several apps over to the WSGI framework, and found minor differences in session handling that require code correction: The current WSGI implementation returns None for uninitialized Session variables, whereas WebKit would dump without a try...except pair. Using Webware/WebKit: session = self.session() try: id = session['userid'] except: id = None if id is None: """ Error """ else """ Generate Page """ Using WSGIKit: session = self.session() id = session._values['userid'] if id is None: """ Error """ else """ Generate Page """ This is fine, but session[] always returns None, so I have to use _values[]. Is this a bug or intended behavior? -- Eric Radman | http://eradman.com |