Beispiel #1
0
 def __create_logfile(self):
     """
     function: create log file
     input : N/A
     output: N/A
     """
     try:
         if not os.path.isdir(os.path.dirname(self.log_file)):
             CommonTools.mkdir_with_mode(os.path.dirname(self.log_file),
                                         Constant.AUTH_COMMON_DIR_STR)
         CommonTools.create_file_if_not_exist(self.log_file)
     except Exception as error:
         raise Exception(Errors.EXECUTE_RESULT['gauss_0411'] % error)
Beispiel #2
0
 def create_env_file_if_not_exist(self):
     """
     Create env file
     """
     ret = CommonTools.create_file_if_not_exist(self.env_file_path)
     if ret:
         g.logger.info('Successfully create env file.')
     else:
         g.logger.info('Env file already exist.')