+ raise src.SatException(msg)
+
+ def put_txt_log_in_appli_log_dir(self, file_name):
+ '''Put the txt log (that contain the system logs, like make command
+ output) in the directory <APPLICATION DIR>/LOGS/<product_name>/
+
+ :param file_name Str: the name of the file to write
+ '''
+ if self.logger.logTxtFile == sys.__stdout__:
+ return
+ dir_where_to_put = os.path.join(self.config.APPLICATION.workdir,
+ "LOGS",
+ self.product_info.name)
+ file_path = os.path.join(dir_where_to_put, file_name)
+ src.ensure_path_exists(dir_where_to_put)
+ # write the logTxtFile copy it to the destination, and then recreate
+ # it as it was
+ self.logger.logTxtFile.close()
+ shutil.move(self.logger.txtFilePath, file_path)
+ self.logger.logTxtFile = open(str(self.logger.txtFilePath), 'w')
+ self.logger.logTxtFile.write(open(file_path, "r").read())
+