#NEWLINE# def get_species_list( self ) : #NEWLINE# #INDENT# 'Return a formatted list of all species.' #NEWLINE# c = self . assets . db . cursor ( ) #NEWLINE# c . execute ( "select distinct name from assets where type = 'species' order by name" ) #NEWLINE# names = [ x [ 0 ] for x in c . fetchall ( ) ] #NEWLINE# formatted = [ ] #NEWLINE# for s in names : #NEWLINE# #INDENT# if ( s == 'dummy' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# formatted . append ( ( s [ 0 ] . upper ( ) + s [ 1 : ] ) ) #NEWLINE# #UNINDENT# except IndexError : #NEWLINE# #INDENT# formatted . append ( s ) #NEWLINE# logging . exception ( 'Unable to format species: %s' , s ) #NEWLINE# #UNINDENT# #UNINDENT# return formatted