#NEWLINE# def create_client( self , name , app_id , valid_facets ) : #NEWLINE# #INDENT# ensure_valid_name ( client ) #NEWLINE# try : #NEWLINE# #INDENT# self . get_client ( name ) #NEWLINE# raise ValueError ( ( 'Client already exists: %s' % name ) ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# client = Client ( name , app_id , valid_facets ) #NEWLINE# self . _session . add ( client ) #NEWLINE# log . info ( 'Client created: %s' , name )