diff --git a/src/oebuild/parse_template.py b/src/oebuild/parse_template.py index 1ff57c8b116f21936d8ff0a275e43845a86a8aec..caec95aefad8c8b8982ee7515656ae030adfa855 100644 --- a/src/oebuild/parse_template.py +++ b/src/oebuild/parse_template.py @@ -9,7 +9,6 @@ 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 import sys from dataclasses import dataclass from typing import Optional @@ -17,7 +16,7 @@ import pathlib import os from ruamel.yaml.scalarstring import LiteralScalarString - +from oebuild.m_log import logger import oebuild.util as oebuild_util import oebuild.const as oebuild_const from oebuild.struct import RepoParam @@ -127,7 +126,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 +140,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 = [] @@ -304,7 +303,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)