#NEWLINE# def session_view( view , info ) : #NEWLINE# #INDENT# if info . options . get ( 'uses_session' ) : #NEWLINE# #INDENT# return add_vary ( 'Cookie' ) ( info ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# @ functools . wraps ( view ) #NEWLINE# def wrapped( context , request ) : #NEWLINE# #INDENT# original_session = request . session #NEWLINE# request . session = InvalidSession ( ) #NEWLINE# try : #NEWLINE# #INDENT# return view ( context , request ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# request . session = original_session #NEWLINE# #UNINDENT# #UNINDENT# return wrapped