#NEWLINE# def get_data_source_choices( self , request , context ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# data_sources = saharaclient . data_source_list ( request ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# data_sources = [ ] #NEWLINE# exceptions . handle ( request , _ ( 'Unable to fetch data sources.' ) ) #NEWLINE# #UNINDENT# choices = [ ( data_source . id , data_source . name ) for data_source in data_sources ] #NEWLINE# choices . insert ( 0 , ( None , 'None' ) ) #NEWLINE# return choices