#NEWLINE# def get_config( self , directory , x_arg = None , opts = None ) : #NEWLINE# #INDENT# if ( directory is None ) : #NEWLINE# #INDENT# directory = self . directory #NEWLINE# #UNINDENT# config = Config ( os . path . join ( directory , 'alembic.ini' ) ) #NEWLINE# config . set_main_option ( 'script_location' , directory ) #NEWLINE# if ( config . cmd_opts is None ) : #NEWLINE# #INDENT# config . cmd_opts = argparse . Namespace ( ) #NEWLINE# #UNINDENT# for opt in ( opts or [ ] ) : #NEWLINE# #INDENT# setattr ( config . cmd_opts , opt , True ) #NEWLINE# #UNINDENT# if ( x_arg is not None ) : #NEWLINE# #INDENT# if ( not getattr ( config . cmd_opts , 'x' , None ) ) : #NEWLINE# #INDENT# setattr ( config . cmd_opts , 'x' , [ x_arg ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# config . cmd_opts . x . append ( x_arg ) #NEWLINE# #UNINDENT# #UNINDENT# return self . call_configure_callbacks ( config )