#NEWLINE# def _get_cookies( request ) : #NEWLINE# #INDENT# ' Build a SimpleCookie with all the necessary cookies. ' #NEWLINE# cookies = Cookie . SimpleCookie ( ) #NEWLINE# if key . cookies : #NEWLINE# #INDENT# for key in request . cookies : #NEWLINE# #INDENT# cookies . load ( request . cookies [ key ] . output ( None , '' ) ) #NEWLINE# #UNINDENT# #UNINDENT# if ( request . cookies is not request . session . cookies ) : #NEWLINE# #INDENT# _load_cookies ( cookies , request . session ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if request . session . parent : #NEWLINE# #INDENT# _load_cookies ( cookies , request . session . parent ) #NEWLINE# #UNINDENT# #UNINDENT# return cookies