#NEWLINE# def git_get_keywords( versionfile_abs ) : #NEWLINE# #INDENT# keywords = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# f = open ( versionfile_abs , 'r' ) #NEWLINE# for line in f . readlines ( ) : #NEWLINE# #INDENT# if line . strip ( ) . startswith ( 'git_refnames =' ) : #NEWLINE# #INDENT# mo = re . search ( '=\\s*"(.*)"' , line ) #NEWLINE# if mo : #NEWLINE# #INDENT# keywords [ 'refnames' ] = mo . group ( 1 ) #NEWLINE# #UNINDENT# #UNINDENT# if line . strip ( ) . startswith ( 'git_full =' ) : #NEWLINE# #INDENT# mo = re . search ( '=\\s*"(.*)"' , line ) #NEWLINE# if mo : #NEWLINE# #INDENT# keywords [ 'full' ] = mo . group ( 1 ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# f . close ( ) #NEWLINE# #UNINDENT# except EnvironmentError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return keywords