#NEWLINE# def _key_to_file( self , session_key = None ) : #NEWLINE# #INDENT# '\n        Get the file associated with this session key.\n        ' #NEWLINE# if ( session_key is None ) : #NEWLINE# #INDENT# session_key = self . _get_or_create_session_key ( ) #NEWLINE# #UNINDENT# if ( not set ( session_key ) . issubset ( set ( VALID_KEY_CHARS ) ) ) : #NEWLINE# #INDENT# raise SuspiciousOperation ( 'Invalid characters in session key' ) #NEWLINE# #UNINDENT# return os . path . join ( self . storage_path , ( self . file_prefix + session_key ) )