def _in_process_find_conf_file(conf_src_dir, conf_file_name, use_sample=True):
 dflt_src_dir = os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir, os.pardir, os.pardir, 'etc'))
 conf_src_dir = (dflt_src_dir if (conf_src_dir is None) else conf_src_dir)
 conf_file_path = os.path.join(conf_src_dir, conf_file_name)
 if os.path.exists(conf_file_path):
  return conf_file_path
 if use_sample:
  conf_file_name += '-sample'
  conf_file_path = os.path.join(dflt_src_dir, conf_file_name)
  if os.path.exists(conf_file_path):
   return conf_file_path
 msg = ('Failed to find config file %s' % conf_file_name)
 raise InProcessException(msg)

def _in_process_find_conf_file ( conf_src_dir , conf_file_name , use_sample = True ) : dflt_src_dir = os . path . normpath ( os . path . join ( os . path . abspath ( __file__ ) , os . pardir , os . pardir , os . pardir , 'etc' ) ) conf_src_dir = ( dflt_src_dir if ( conf_src_dir is None ) else conf_src_dir ) conf_file_path = os . path . join ( conf_src_dir , conf_file_name ) if os . path . exists ( conf_file_path ) : return conf_file_path if use_sample : conf_file_name += '-sample' conf_file_path = os . path . join ( dflt_src_dir , conf_file_name ) if os . path . exists ( conf_file_path ) : return conf_file_path msg = ( 'Failed to find config file %s' % conf_file_name ) raise InProcessException ( msg )
look for a file first in conf_src_dir .