#NEWLINE# def _get_root_home( cfg , name , check_fun ) : #NEWLINE# #INDENT# root = get_config ( cfg ) #NEWLINE# problem = check_fun ( root ) #NEWLINE# while problem : #NEWLINE# #INDENT# info = ( 'Please select the %s directory. This is the root directory of the %s installation.' % ( cfg , name ) ) #NEWLINE# msg = '\n\n' . join ( ( problem , info ) ) #NEWLINE# information ( None , msg , ( 'Select the %s Directory' % cfg ) ) #NEWLINE# msg = ( 'Please select the %s Directory' % cfg ) #NEWLINE# dlg = DirectoryDialog ( message = msg , new_directory = False ) #NEWLINE# if ( dlg . open ( ) == OK ) : #NEWLINE# #INDENT# root = dlg . path #NEWLINE# problem = check_fun ( root ) #NEWLINE# if ( problem is None ) : #NEWLINE# #INDENT# set_config ( cfg , root ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# return root