#NEWLINE# def get_repo_description( repo_key ) : #NEWLINE# #INDENT# relative_paths = ( os . path . join ( repo_key , 'description' ) , os . path . join ( repo_key , '.git' , 'description' ) ) #NEWLINE# extant_relative_paths = ( relative_path for relative_path in relative_paths if os . path . isfile ( safe_join ( current_app . config [ 'RESTFULGIT_REPO_BASE_PATH' ] , relative_path ) ) ) #NEWLINE# extant_relative_path = next ( extant_relative_paths , None ) #NEWLINE# if ( extant_relative_path is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# with open ( os . path . join ( current_app . config [ 'RESTFULGIT_REPO_BASE_PATH' ] , extant_relative_path ) , 'r' ) as content_file : #NEWLINE# #INDENT# description = content_file . read ( ) #NEWLINE# if ( description == DEFAULT_GIT_DESCRIPTION ) : #NEWLINE# #INDENT# description = None #NEWLINE# #UNINDENT# return description