Eric Radman wrote:
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?

It would be a bug. I forgot to put in a return for the __getitem__ method. Doh. Fixed in svn.


--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org


------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to