#NEWLINE# def _get_basedir( datadir , target_genome ) : #NEWLINE# #INDENT# 'Retrieve base directory for uploading.\n    ' #NEWLINE# genome_dir = os . path . join ( datadir , 'genomes' ) #NEWLINE# for dirname in glob . glob ( os . path . join ( genome_dir , '*' , '*' ) ) : #NEWLINE# #INDENT# if dirname . endswith ( ( '/%s' % target_genome ) ) : #NEWLINE# #INDENT# return dirname