#NEWLINE# def open_config( repo ) : #NEWLINE# #INDENT# config_path = os . path . join ( repo . working_tree_dir , '.saplings' ) #NEWLINE# if os . path . exists ( config_path ) : #NEWLINE# #INDENT# with open ( config_path , 'r' ) as config : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return saplib . Config ( repo , config . read ( ) ) #NEWLINE# #UNINDENT# except saplib . ConfigError as e : #NEWLINE# #INDENT# usage ( 'Problem loading .saplings config: %s' , e ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return saplib . Config ( repo )