#NEWLINE# def regen( self ) : #NEWLINE# #INDENT# 'Regenerate a new SID' #NEWLINE# id = self . __gen_id ( ) #NEWLINE# c = SignedCookie ( ( SECRET_KEY + id ) ) #NEWLINE# for ( key , morsel ) in self . cookies . items ( ) : #NEWLINE# #INDENT# c [ id ] = morsel . value #NEWLINE# c [ key ] . update ( morsel . items ( ) ) #NEWLINE# #UNINDENT# c [ 'SID' ] = id #NEWLINE# c [ 'atime' ] = repr ( timegm ( gmtime ( ) ) ) #NEWLINE# self . cookies = c #NEWLINE# for k in self . cookies . keys ( ) : #NEWLINE# #INDENT# self . set_cookie ( k )