#NEWLINE# def get_object( self , name ) : #NEWLINE# #INDENT# "Returns a CSVSource object with filename constructed from store's\n        path and extension" #NEWLINE# fields_file = ( '%s_fields.json' % name ) #NEWLINE# fields_path = os . path . join ( self . path , fields_file ) #NEWLINE# name = ( name + self . extension ) #NEWLINE# path = os . path . join ( self . path , name ) #NEWLINE# args = dict ( self . kwargs ) #NEWLINE# if os . path . exists ( fields_path ) : #NEWLINE# #INDENT# with open ( fields_path ) as f : #NEWLINE# #INDENT# metadata = json . load ( f ) #NEWLINE# #UNINDENT# args [ 'fields' ] = FieldList ( * metadata ) #NEWLINE# #UNINDENT# if ( self . role in [ 's' , 'src' , 'source' ] ) : #NEWLINE# #INDENT# return CSVSource ( path , ** args ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . role in [ 't' , 'target' ] ) : #NEWLINE# #INDENT# return CSVTarget ( path , ** args ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ArgumentError ( ( "Unknown CSV object role '%s'" % role ) )