From 7cf093519dfb3694f88a41db70187ed14a1f9478 Mon Sep 17 00:00:00 2001 From: Caohongtao Date: Thu, 27 Jun 2024 06:17:36 +0000 Subject: [PATCH] The structure of log information is optimized Signed-off-by: Caohongtao --- src/oebuild/parse_template.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/oebuild/parse_template.py b/src/oebuild/parse_template.py index 7f4cd18..aa40f18 100644 --- a/src/oebuild/parse_template.py +++ b/src/oebuild/parse_template.py @@ -9,7 +9,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. ''' -import logging +from oebuild.m_log import logger import sys from dataclasses import dataclass from typing import Optional @@ -127,7 +127,7 @@ class ParseTemplate: if self.platform is None: self.platform = os.path.splitext(config_name)[0].strip("\n") else: - logging.error("Only one platform is allowed") + logger.error("Only one platform is allowed") sys.exit(-1) self.platform_template = PlatformTemplate( machine=data['machine'], @@ -141,7 +141,7 @@ class ParseTemplate: raise PlatformNotAdd('please add platform template first') if self.platform is None: - logging.error("Platform not specified") + logger.error("Platform not specified") sys.exit(-1) support_arch = [] @@ -330,7 +330,7 @@ def parse_repos_layers_local_obj(common_yaml_path): parse from yaml to repos, layers and local ''' if not os.path.exists(common_yaml_path): - logging.error('can not find .oebuild/common.yaml in yocto-meta-openeuler') + logger.error('can not find .oebuild/common.yaml in yocto-meta-openeuler') sys.exit(-1) data = oebuild_util.read_yaml(common_yaml_path) -- Gitee