# HG changeset patch # User paulb # Date 1094399575 0 # Node ID c7b3683732eba1a5ae88c893714e128505eccee4 # Parent 0cf18a44cf67c8d444315b06f06d65f16e83f9dd [project @ 2004-09-05 15:52:55 by paulb] Changed session usage so that absent sessions are always compared against None. diff -r 0cf18a44cf67 -r c7b3683732eb examples/Common/Sessions/__init__.py --- a/examples/Common/Sessions/__init__.py Sun Sep 05 15:52:20 2004 +0000 +++ b/examples/Common/Sessions/__init__.py Sun Sep 05 15:52:55 2004 +0000 @@ -23,7 +23,7 @@ # If a session exists, perform editing operations. - if session: + if session is not None: names = fields.get("name") or ["test"] values = fields.get("value") or ["test"] name = names[0] @@ -45,7 +45,7 @@ # If a session exists, get its contents. - if session: + if session is not None: session_items = session.items() else: session_items = []